Mercurial > hg > xemacs-beta
comparison src/number.h @ 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 | f557693c61de |
children | b5e1d4f6b66f |
comparison
equal
deleted
inserted
replaced
3390:1a44d3ebacc1 | 3391:639cdee384e4 |
---|---|
97 { \ | 97 { \ |
98 Lisp_Object retval = make_bignum(0); \ | 98 Lisp_Object retval = make_bignum(0); \ |
99 bignum_##op (XBIGNUM_DATA (retval), XBIGNUM_DATA (b), arg); \ | 99 bignum_##op (XBIGNUM_DATA (retval), XBIGNUM_DATA (b), arg); \ |
100 return Fcanonicalize_number (retval); \ | 100 return Fcanonicalize_number (retval); \ |
101 } while (0) | 101 } while (0) |
102 | |
103 #if SIZEOF_EMACS_INT == SIZEOF_LONG | |
104 # define bignum_fits_emacs_int_p(b) bignum_fits_long_p(b) | |
105 # define bignum_to_emacs_int(b) bignum_to_long(b) | |
106 #elif SIZEOF_EMACS_INT == SIZEOF_INT | |
107 # define bignum_fits_emacs_int_p(b) bignum_fits_int_p(b) | |
108 # define bignum_to_emacs_int(b) bignum_to_int(b) | |
109 #else | |
110 # error Bignums currently do not work with long long Emacs integers. | |
111 #endif | |
102 | 112 |
103 extern Lisp_Object make_bignum (long); | 113 extern Lisp_Object make_bignum (long); |
104 extern Lisp_Object make_bignum_bg (bignum); | 114 extern Lisp_Object make_bignum_bg (bignum); |
105 extern bignum scratch_bignum, scratch_bignum2; | 115 extern bignum scratch_bignum, scratch_bignum2; |
106 | 116 |