diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-17 16:49:43 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-17 16:49:43 +0800 |
commit | 3b0217d2a2d4e345a31a68948dfb0feaec4a8a2a (patch) | |
tree | a6e0a819e7d9fbe24fc7aff42704e8a59fc7ac8f /types.cpp | |
parent | f9633b0bef26184c5e36eba25d8b3b6bd687ee18 (diff) |
more doc
Diffstat (limited to 'types.cpp')
-rw-r--r-- | types.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1018,11 +1018,13 @@ void RatNumObj::abs() { #endif } +#ifdef GMP_SUPPORT IntNumObj *RatNumObj::to_int() { if (val.get_den() != 1) throw TokenError("an integer", RUN_ERR_WRONG_TYPE); return new IntNumObj(val.get_num()); } +#endif ReprCons *RatNumObj::get_repr_cons() { #ifndef GMP_SUPPORT @@ -1149,9 +1151,11 @@ bool IntNumObj::eq(NumObj *_r) { return val == static_cast<IntNumObj*>(_r)->val; } +#ifdef GMP_SUPPORT IntNumObj* IntNumObj::to_int() { return new IntNumObj(val); } +#endif ReprCons *IntNumObj::get_repr_cons() { #ifndef GMP_SUPPORT |