Changeset 1117 for to-imperative/trunk/runtime/rf_integer.ih
- Timestamp:
- Aug 6, 2003, 10:18:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
to-imperative/trunk/runtime/rf_integer.ih
r1082 r1117 89 89 } 90 90 91 inline bool Integer::operator == (intptr_t _n) const 92 { 93 mpz_t* p = static_cast<mpz_t*>(ptr_data2); 94 return mpz_cmp_si(*p, _n) == 0; 95 } 96 91 97 inline int Integer::cmp (Integer const& _n) const 92 98 { … … 94 100 mpz_t* q = static_cast<mpz_t*>(_n.ptr_data2); 95 101 return mpz_cmp(*p, *q); 102 } 103 104 inline int Integer::cmp (intptr_t _n) const 105 { 106 mpz_t* p = static_cast<mpz_t*>(ptr_data2); 107 return mpz_cmp_si(*p, _n); 96 108 } 97 109 … … 272 284 } 273 285 286 inline long Integer::to_int () const 287 { 288 return mpz_get_si(*(get_mpz_ptr())); 289 } 290 274 291 inline Integer::operator pxx::WString () const 275 292 {
Note: See TracChangeset
for help on using the changeset viewer.