diff options
Diffstat (limited to 'src/lisp.h')
| -rw-r--r-- | src/lisp.h | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/src/lisp.h b/src/lisp.h index 1e3036344f5..4c9543bdfe8 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -291,7 +291,7 @@ union Lisp_Object | |||
| 291 | { | 291 | { |
| 292 | /* Used for comparing two Lisp_Objects; | 292 | /* Used for comparing two Lisp_Objects; |
| 293 | also, positive integers can be accessed fast this way. */ | 293 | also, positive integers can be accessed fast this way. */ |
| 294 | EMACS_UINT i; | 294 | EMACS_INT i; |
| 295 | 295 | ||
| 296 | struct | 296 | struct |
| 297 | { | 297 | { |
| @@ -315,7 +315,7 @@ union Lisp_Object | |||
| 315 | { | 315 | { |
| 316 | /* Used for comparing two Lisp_Objects; | 316 | /* Used for comparing two Lisp_Objects; |
| 317 | also, positive integers can be accessed fast this way. */ | 317 | also, positive integers can be accessed fast this way. */ |
| 318 | EMACS_UINT i; | 318 | EMACS_INT i; |
| 319 | 319 | ||
| 320 | struct | 320 | struct |
| 321 | { | 321 | { |
| @@ -494,8 +494,8 @@ enum pvec_type | |||
| 494 | #ifdef USE_LSB_TAG | 494 | #ifdef USE_LSB_TAG |
| 495 | 495 | ||
| 496 | # define XSET(var, vartype, ptr) \ | 496 | # define XSET(var, vartype, ptr) \ |
| 497 | (eassert ((((EMACS_UINT) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \ | 497 | (eassert ((((uintptr_t) (ptr)) & ((1 << GCTYPEBITS) - 1)) == 0), \ |
| 498 | (var).u.val = ((EMACS_UINT) (ptr)) >> GCTYPEBITS, \ | 498 | (var).u.val = ((uintptr_t) (ptr)) >> GCTYPEBITS, \ |
| 499 | (var).u.type = ((char) (vartype))) | 499 | (var).u.type = ((char) (vartype))) |
| 500 | 500 | ||
| 501 | /* Some versions of gcc seem to consider the bitfield width when issuing | 501 | /* Some versions of gcc seem to consider the bitfield width when issuing |
| @@ -512,7 +512,7 @@ enum pvec_type | |||
| 512 | # define XSETFASTINT(a, b) ((a).i = (b)) | 512 | # define XSETFASTINT(a, b) ((a).i = (b)) |
| 513 | 513 | ||
| 514 | # define XSET(var, vartype, ptr) \ | 514 | # define XSET(var, vartype, ptr) \ |
| 515 | (((var).s.val = ((EMACS_INT) (ptr))), ((var).s.type = ((char) (vartype)))) | 515 | (((var).s.val = ((intptr_t) (ptr))), ((var).s.type = ((char) (vartype)))) |
| 516 | 516 | ||
| 517 | #ifdef DATA_SEG_BITS | 517 | #ifdef DATA_SEG_BITS |
| 518 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers | 518 | /* DATA_SEG_BITS forces extra bits to be or'd in with any pointers |
| @@ -1013,7 +1013,7 @@ struct Lisp_Bool_Vector | |||
| 1013 | just the subtype information. */ | 1013 | just the subtype information. */ |
| 1014 | struct vectorlike_header header; | 1014 | struct vectorlike_header header; |
| 1015 | /* This is the size in bits. */ | 1015 | /* This is the size in bits. */ |
| 1016 | EMACS_UINT size; | 1016 | EMACS_INT size; |
| 1017 | /* This contains the actual bits, packed into bytes. */ | 1017 | /* This contains the actual bits, packed into bytes. */ |
| 1018 | unsigned char data[1]; | 1018 | unsigned char data[1]; |
| 1019 | }; | 1019 | }; |
| @@ -1890,7 +1890,7 @@ typedef struct { | |||
| 1890 | #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ | 1890 | #define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ |
| 1891 | Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ | 1891 | Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ |
| 1892 | static DECL_ALIGN (struct Lisp_Subr, sname) = \ | 1892 | static DECL_ALIGN (struct Lisp_Subr, sname) = \ |
| 1893 | { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ | 1893 | { PVEC_SUBR, \ |
| 1894 | { .a ## maxargs = fnname }, \ | 1894 | { .a ## maxargs = fnname }, \ |
| 1895 | minargs, maxargs, lname, intspec, 0}; \ | 1895 | minargs, maxargs, lname, intspec, 0}; \ |
| 1896 | Lisp_Object fnname | 1896 | Lisp_Object fnname |
| @@ -2628,7 +2628,7 @@ extern void init_fringe_once (void); | |||
| 2628 | /* Defined in image.c */ | 2628 | /* Defined in image.c */ |
| 2629 | extern Lisp_Object QCascent, QCmargin, QCrelief; | 2629 | extern Lisp_Object QCascent, QCmargin, QCrelief; |
| 2630 | extern Lisp_Object QCconversion; | 2630 | extern Lisp_Object QCconversion; |
| 2631 | extern int x_bitmap_mask (struct frame *, int); | 2631 | extern int x_bitmap_mask (struct frame *, ptrdiff_t); |
| 2632 | extern void syms_of_image (void); | 2632 | extern void syms_of_image (void); |
| 2633 | extern void init_image (void); | 2633 | extern void init_image (void); |
| 2634 | 2634 | ||
| @@ -3590,29 +3590,19 @@ extern void init_system_name (void); | |||
| 3590 | 3590 | ||
| 3591 | #define SWITCH_ENUM_CAST(x) (x) | 3591 | #define SWITCH_ENUM_CAST(x) (x) |
| 3592 | 3592 | ||
| 3593 | /* Loop over Lisp list LIST. Signal an error if LIST is not a proper | 3593 | /* Use this to suppress gcc's warnings. */ |
| 3594 | list, or if it contains circles. | 3594 | #ifdef lint |
| 3595 | |||
| 3596 | HARE and TORTOISE should be the names of Lisp_Object variables, and | ||
| 3597 | N should be the name of an EMACS_INT variable declared in the | ||
| 3598 | function where the macro is used. Each nested loop should use | ||
| 3599 | its own variables. | ||
| 3600 | 3595 | ||
| 3601 | In the loop body, HARE is set to each cons of LIST, and N is the | 3596 | /* Use CODE only if lint checking is in effect. */ |
| 3602 | length of the list processed so far. */ | 3597 | # define IF_LINT(Code) Code |
| 3603 | 3598 | ||
| 3604 | #define LIST_END_P(list, obj) \ | 3599 | /* Assume that the expression COND is true. This differs in intent |
| 3605 | (NILP (obj) \ | 3600 | from 'assert', as it is a message from the programmer to the compiler. */ |
| 3606 | ? 1 \ | 3601 | # define lint_assume(cond) ((cond) ? (void) 0 : abort ()) |
| 3607 | : (CONSP (obj) \ | ||
| 3608 | ? 0 \ | ||
| 3609 | : (wrong_type_argument (Qlistp, (list))), 1)) | ||
| 3610 | 3602 | ||
| 3611 | /* Use this to suppress gcc's `...may be used before initialized' warnings. */ | ||
| 3612 | #ifdef lint | ||
| 3613 | # define IF_LINT(Code) Code | ||
| 3614 | #else | 3603 | #else |
| 3615 | # define IF_LINT(Code) /* empty */ | 3604 | # define IF_LINT(Code) /* empty */ |
| 3605 | # define lint_assume(cond) ((void) (0 && (cond))) | ||
| 3616 | #endif | 3606 | #endif |
| 3617 | 3607 | ||
| 3618 | /* The ubiquitous min and max macros. */ | 3608 | /* The ubiquitous min and max macros. */ |
| @@ -3635,9 +3625,7 @@ extern void init_system_name (void); | |||
| 3635 | fixnum. */ | 3625 | fixnum. */ |
| 3636 | 3626 | ||
| 3637 | #define make_fixnum_or_float(val) \ | 3627 | #define make_fixnum_or_float(val) \ |
| 3638 | (FIXNUM_OVERFLOW_P (val) \ | 3628 | (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val)) |
| 3639 | ? make_float (val) \ | ||
| 3640 | : make_number ((EMACS_INT)(val))) | ||
| 3641 | 3629 | ||
| 3642 | 3630 | ||
| 3643 | /* Checks the `cycle check' variable CHECK to see if it indicates that | 3631 | /* Checks the `cycle check' variable CHECK to see if it indicates that |