1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 19:50:24 +02:00

(SCM_MAKE_BIGNUM_TAG): New.

This commit is contained in:
Marius Vollmer 2001-11-25 15:12:39 +00:00
parent 6c4493a045
commit 760eb0ce25

View file

@ -175,11 +175,12 @@
#define SCM_BDIGITS(x) ((SCM_BIGDIG *) (SCM_CELL_WORD_1 (x))) #define SCM_BDIGITS(x) ((SCM_BIGDIG *) (SCM_CELL_WORD_1 (x)))
#define SCM_SET_BIGNUM_BASE(n, b) (SCM_SET_CELL_WORD_1 ((n), (b))) #define SCM_SET_BIGNUM_BASE(n, b) (SCM_SET_CELL_WORD_1 ((n), (b)))
#define SCM_NUMDIGS(x) ((size_t) (SCM_CELL_WORD_0 (x) >> SCM_BIGSIZEFIELD)) #define SCM_NUMDIGS(x) ((size_t) (SCM_CELL_WORD_0 (x) >> SCM_BIGSIZEFIELD))
#define SCM_SETNUMDIGS(x, v, sign) \ #define SCM_MAKE_BIGNUM_TAG(v, sign) \
SCM_SET_CELL_WORD_0 (x, \ (scm_tc16_big \
scm_tc16_big \
| ((sign) ? SCM_BIGSIGNFLAG : 0) \ | ((sign) ? SCM_BIGSIGNFLAG : 0) \
| (((v) + 0L) << SCM_BIGSIZEFIELD)) | (((v) + 0L) << SCM_BIGSIZEFIELD))
#define SCM_SETNUMDIGS(x, v, sign) \
SCM_SET_CELL_WORD_0 (x, SCM_MAKE_BIGNUM_TAG (v, sign))