diff options
author | Teddy <ted.sybil@gmail.com> | 2013-08-14 14:52:46 +0800 |
---|---|---|
committer | Teddy <ted.sybil@gmail.com> | 2013-08-14 14:52:46 +0800 |
commit | 8c93190f057399889425a9103fe0615dcef4e1b7 (patch) | |
tree | e6b3dbc1967c3dc98cca6e8f2046f4a32afbbf92 /types.h | |
parent | c2522466d2fcb5273004f1989b89186cd68001d7 (diff) |
gc detect in list-specific built-ins, proper numeric conversion
Diffstat (limited to 'types.h')
-rw-r--r-- | types.h | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -461,12 +461,14 @@ class RealNumObj: public InexactNumObj {/*{{{*/ };/*}}}*/ +class IntNumObj; /** @class ExactNumObj * Exact number implementation (using gmp) */ class ExactNumObj: public NumObj {/*{{{*/ public: ExactNumObj(NumLvl level); + virtual IntNumObj *to_int() = 0; };/*}}}*/ /** @class RatNumObj @@ -482,6 +484,7 @@ class RatNumObj: public ExactNumObj {/*{{{*/ mpq_class val; RatNumObj(mpq_class val); RatNumObj(const RatNumObj &ori); + IntNumObj *to_int(); #endif NumObj *clone() const; /** Try to construct an RatNumObj object @@ -501,6 +504,7 @@ class RatNumObj: public ExactNumObj {/*{{{*/ bool le(NumObj *r); bool ge(NumObj *r); bool eq(NumObj *r); + ReprCons *get_repr_cons(); };/*}}}*/ @@ -520,6 +524,7 @@ class IntNumObj: public ExactNumObj {/*{{{*/ IntNumObj(mpz_class val); int get_i(); /** Copy constructor */ + IntNumObj *to_int(); IntNumObj(const IntNumObj &ori); #endif NumObj *clone() const; @@ -546,6 +551,7 @@ class IntNumObj: public ExactNumObj {/*{{{*/ bool le(NumObj *r); bool ge(NumObj *r); bool eq(NumObj *r); + ReprCons *get_repr_cons(); };/*}}}*/ |