aboutsummaryrefslogtreecommitdiffstats
path: root/src/coding.h
diff options
context:
space:
mode:
authorPaul Eggert2015-12-06 09:09:07 -0800
committerPaul Eggert2015-12-06 09:09:58 -0800
commit302bbe00b31852942827dab42154f33411b99171 (patch)
tree4d8a800f08f4283b4d3dbbfb1c47267efc2e11bc /src/coding.h
parent2b3f5de2b31b90733a88868b31bed3f7038f7055 (diff)
downloademacs-302bbe00b31852942827dab42154f33411b99171.tar.gz
emacs-302bbe00b31852942827dab42154f33411b99171.zip
Improve module interface when WIDE_EMACS_INT
* src/emacs-module.c (plain_values): New constant. (module_nil): Now a constant. (Finternal_module_call, value_to_lisp_bits, lisp_to_value_bits) (syms_of_module): Use if, not #ifdef, so that both sides are checked at compile-time, and so that GCC doesn’t complain about an unused var in the typical case. Also, depend on plain_values, not on WIDE_EMACS_INT; the code shouldn’t assume that WIDE_EMACS_INT implies !USE_LSB_TAG. (value_to_lisp_bits, lisp_to_value_bits): New functions. Sign-extend integers rather than zero-extending them, as small negative integers are more likely. (value_to_lisp, lisp_to_value): Rewrite in terms of the new *_bits functions. (HAVE_STRUCT_ATTRIBUTE_ALIGNED): Define to 0 if not already defined. (mark_modules): Remove. All uses removed. (lisp_to_value): Don’t assume Fcons returns a pointer aligned to GCALIGNMENT. (syms_of_module): Check that module_nil converts to Qnil. * src/lisp.h (lisp_h_XSYMBOL, XSYMBOL): Use signed conversion, since we prefer signed to unsigned when either will do. (TAG_PTR): Sign-extend pointers when USE_LSB_TAG, as this is a bit better for emacs-module.c.
Diffstat (limited to 'src/coding.h')
0 files changed, 0 insertions, 0 deletions