• Paul Eggert's avatar
    Be more careful about pointers to bignum vals · 39fee209
    Paul Eggert authored
    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.
    39fee209
alloc.c 203 KB