summaryrefslogtreecommitdiff
path: root/test/lisp/calc/calc-tests.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-08-21 00:06:00 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-08-21 00:11:45 -0700
commit39fee209942ab7c35b4789f0010264cd6a52197b (patch)
tree96f1858c890436713ba0da0fca93d1f33d7dd33a /test/lisp/calc/calc-tests.el
parent3881542edeac3e94291c2ce574edf0b0e52764a8 (diff)
downloademacs-39fee209942ab7c35b4789f0010264cd6a52197b.tar.gz
emacs-39fee209942ab7c35b4789f0010264cd6a52197b.tar.bz2
emacs-39fee209942ab7c35b4789f0010264cd6a52197b.zip
Be more careful about pointers to bignum vals
This uses ‘const’ to be better at catching bugs that mistakenly attempt to modify a bignum value. Lisp bignums are supposed to be immutable. * src/alloc.c (make_pure_bignum): * src/fns.c (sxhash_bignum): Accept Lisp_Object instead of struct Lisp_Bignum *, as that’s simpler now. Caller changed. * src/bignum.h (bignum_val, xbignum_val): New inline functions. Prefer them to &i->value and XBIGNUM (i)->value, since they apply ‘const’ to the result. * src/timefns.c (lisp_to_timespec): Use mpz_t const * to point to a bignum value.
Diffstat (limited to 'test/lisp/calc/calc-tests.el')
0 files changed, 0 insertions, 0 deletions