Mercurial > hg > xemacs-beta
comparison src/number.c @ 3391:639cdee384e4
[xemacs-hg @ 2006-05-10 15:03:35 by james]
Fix bignum arithmetic on 64-bit platforms. See xemacs-patches message with ID
<m364kg9nnq.fsf@jerrypc.cs.usu.edu>.
author | james |
---|---|
date | Wed, 10 May 2006 15:03:35 +0000 |
parents | facf3239ba30 |
children | b5e1d4f6b66f |
comparison
equal
deleted
inserted
replaced
3390:1a44d3ebacc1 | 3391:639cdee384e4 |
---|---|
406 bignum_fits_long_p (XRATIO_DENOMINATOR (number)) && | 406 bignum_fits_long_p (XRATIO_DENOMINATOR (number)) && |
407 bignum_to_long (XRATIO_DENOMINATOR (number)) == 1L) | 407 bignum_to_long (XRATIO_DENOMINATOR (number)) == 1L) |
408 number = make_bignum_bg (XRATIO_NUMERATOR (number)); | 408 number = make_bignum_bg (XRATIO_NUMERATOR (number)); |
409 #endif | 409 #endif |
410 #ifdef HAVE_BIGNUM | 410 #ifdef HAVE_BIGNUM |
411 if (BIGNUMP (number) && bignum_fits_int_p (XBIGNUM_DATA (number))) | 411 if (BIGNUMP (number) && bignum_fits_emacs_int_p (XBIGNUM_DATA (number))) |
412 { | 412 { |
413 int n = bignum_to_int (XBIGNUM_DATA (number)); | 413 EMACS_INT n = bignum_to_emacs_int (XBIGNUM_DATA (number)); |
414 if (NUMBER_FITS_IN_AN_EMACS_INT (n)) | 414 if (NUMBER_FITS_IN_AN_EMACS_INT (n)) |
415 number = make_int (n); | 415 number = make_int (n); |
416 } | 416 } |
417 #endif | 417 #endif |
418 return number; | 418 return number; |