diff options
| author | Stefan Monnier | 2022-04-19 08:25:19 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2022-04-19 08:25:19 -0400 |
| commit | 71005decb4fb447635d7b2367104dd18bdfa64ac (patch) | |
| tree | fc7e4a31bfaab4fa9a4fc269b0a2d027704b8773 /src/lisp.h | |
| parent | 4478f915374a497ec20b51f873ed1b65f22c27dc (diff) | |
| download | emacs-71005decb4fb447635d7b2367104dd18bdfa64ac.tar.gz emacs-71005decb4fb447635d7b2367104dd18bdfa64ac.zip | |
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; | |||
| 342 | # define lisp_h_XIL(i) (i) | 342 | # define lisp_h_XIL(i) (i) |
| 343 | # define lisp_h_XLP(o) ((void *) (uintptr_t) (o)) | 343 | # define lisp_h_XLP(o) ((void *) (uintptr_t) (o)) |
| 344 | # endif | 344 | # endif |
| 345 | # define lisp_h_Qnil 0 | ||
| 345 | #else | 346 | #else |
| 346 | # if LISP_WORDS_ARE_POINTERS | 347 | # if LISP_WORDS_ARE_POINTERS |
| 347 | # define lisp_h_XLI(o) ((EMACS_INT) (o).i) | 348 | # define lisp_h_XLI(o) ((EMACS_INT) (o).i) |
| @@ -352,6 +353,7 @@ typedef EMACS_INT Lisp_Word; | |||
| 352 | # define lisp_h_XIL(i) ((Lisp_Object) {i}) | 353 | # define lisp_h_XIL(i) ((Lisp_Object) {i}) |
| 353 | # define lisp_h_XLP(o) ((void *) (uintptr_t) (o).i) | 354 | # define lisp_h_XLP(o) ((void *) (uintptr_t) (o).i) |
| 354 | # endif | 355 | # endif |
| 356 | # define lisp_h_Qnil {0} | ||
| 355 | #endif | 357 | #endif |
| 356 | 358 | ||
| 357 | #define lisp_h_PSEUDOVECTORP(a,code) \ | 359 | #define lisp_h_PSEUDOVECTORP(a,code) \ |
| @@ -3173,12 +3175,12 @@ CHECK_SUBR (Lisp_Object x) | |||
| 3173 | 3175 | ||
| 3174 | /* This version of DEFUN declares a function prototype with the right | 3176 | /* This version of DEFUN declares a function prototype with the right |
| 3175 | arguments, so we can catch errors with maxargs at compile-time. */ | 3177 | arguments, so we can catch errors with maxargs at compile-time. */ |
| 3176 | #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ | 3178 | #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ |
| 3177 | SUBR_SECTION_ATTRIBUTE \ | 3179 | SUBR_SECTION_ATTRIBUTE \ |
| 3178 | static union Aligned_Lisp_Subr sname = \ | 3180 | static union Aligned_Lisp_Subr sname = \ |
| 3179 | {{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ | 3181 | {{{ PVEC_SUBR << PSEUDOVECTOR_AREA_BITS }, \ |
| 3180 | { .a ## maxargs = fnname }, \ | 3182 | { .a ## maxargs = fnname }, \ |
| 3181 | minargs, maxargs, lname, {intspec}, 0}}; \ | 3183 | minargs, maxargs, lname, {intspec}, lisp_h_Qnil}}; \ |
| 3182 | Lisp_Object fnname | 3184 | Lisp_Object fnname |
| 3183 | 3185 | ||
| 3184 | /* defsubr (Sname); | 3186 | /* defsubr (Sname); |