diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-19 08:25:19 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2022-04-19 08:25:19 -0400 |
commit | 71005decb4fb447635d7b2367104dd18bdfa64ac (patch) | |
tree | fc7e4a31bfaab4fa9a4fc269b0a2d027704b8773 /src/lisp.h | |
parent | 4478f915374a497ec20b51f873ed1b65f22c27dc (diff) | |
download | emacs-71005decb4fb447635d7b2367104dd18bdfa64ac.tar.gz |
Fix GCC warnings when CHECK_LISP_OBJECT_TYPE
* src/lisp.h (lisp_h_Qni): New macro.
(DEFUN): Use it.
* src/alloc.c (syms_of_alloc): Use it.
* src/bytecode.c (Fbyte_code): Fix Lisp_Object/int mixup.
Diffstat (limited to 'src/lisp.h')
-rw-r--r-- | src/lisp.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lisp.h b/src/lisp.h index fb43bfa791b..75f369f5245 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -342,6 +342,7 @@ typedef EMACS_INT Lisp_Word; # define lisp_h_XIL(i) (i) # define lisp_h_XLP(o) ((void *) (uintptr_t) (o)) # endif +# define lisp_h_Qnil 0 #else # if LISP_WORDS_ARE_POINTERS # define lisp_h_XLI(o) ((EMACS_INT) (o).i) @@ -352,6 +353,7 @@ typedef EMACS_INT Lisp_Word; # define lisp_h_XIL(i) ((Lisp_Object) {i}) # define lisp_h_XLP(o) ((void *) (uintptr_t) (o).i) # endif +# define lisp_h_Qnil {0} #endif #define lisp_h_PSEUDOVECTORP(a,code) \ @@ -3173,12 +3175,12 @@ CHECK_SUBR (Lisp_Object x) /* This version of DEFUN declares a function prototype with the right arguments, so we can catch errors with maxargs at compile-time. */ -#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ - SUBR_SECTION_ATTRIBUTE \ - static union Aligned_Lisp_Subr sname = \ - {{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ - { .a ## maxargs = fnname }, \ - minargs, maxargs, lname, {intspec}, 0}}; \ +#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ + SUBR_SECTION_ATTRIBUTE \ + static union Aligned_Lisp_Subr sname = \ + {{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ + { .a ## maxargs = fnname }, \ + minargs, maxargs, lname, {intspec}, lisp_h_Qnil}}; \ Lisp_Object fnname /* defsubr (Sname); |