]> git.eshelyaron.com Git - emacs.git/commit
Prefer _WIDTH macros to sizeof in pdumper.c
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2023 01:51:24 +0000 (18:51 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 15 May 2023 02:28:14 +0000 (19:28 -0700)
commitebf5e4ca1cd39d3f23c4e37d9bdfeb2bf347df6d
tree7734426aad009616be65ee2c729421618399abe8
parent9f8a5989b651c229e5cc7b59fb6dcedd33875f4b
Prefer _WIDTH macros to sizeof in pdumper.c

This is a bit clearer, and should work better on hypothetical
platforms where integers have holes in their representation.
* src/pdumper.c: Since the code no longer uses CHAR_BIT,
don’t worry about whether it equals 8.
(DUMP_OFF_WIDTH): New macro.
(EMACS_RELOC_LENGTH_BITS, DUMP_RELOC_OFFSET_BITS): Use it.
(DUMP_BITSET_WORD_WIDTH): New macro.
(dump_bitsets_init, dump_bitset__bit_slot)
(dump_bitset_bit_set_p, dump_bitset__set_bit_value): Use it.
src/pdumper.c