X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/a8fe7202b4d4b86cdc66997dc624a367631abd51..d5273788df4b8e6f4a266bfac3fd63ac10265dc7:/src/lisp.h diff --git a/src/lisp.h b/src/lisp.h index d59b75caa2..d1a14fcd89 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -22,6 +22,7 @@ along with GNU Emacs. If not, see . */ #define EMACS_LISP_H #include +#include /* Use the configure flag --enable-checking[=LIST] to enable various types of run time checks for Lisp objects. */ @@ -784,13 +785,6 @@ struct Lisp_String unsigned char *data; }; -#ifdef offsetof -#define OFFSETOF(type,field) offsetof(type,field) -#else -#define OFFSETOF(type,field) \ - ((int)((char*)&((type*)0)->field - (char*)0)) -#endif - struct Lisp_Vector { EMACS_UINT size; @@ -801,7 +795,7 @@ struct Lisp_Vector /* If a struct is made to look like a vector, this macro returns the length of the shortest vector that would hold that struct. */ #define VECSIZE(type) ((sizeof (type) \ - - OFFSETOF (struct Lisp_Vector, contents[0]) \ + - offsetof (struct Lisp_Vector, contents[0]) \ + sizeof(Lisp_Object) - 1) /* round up */ \ / sizeof (Lisp_Object)) @@ -809,7 +803,7 @@ struct Lisp_Vector at the end and we need to compute the number of Lisp_Object fields (the ones that the GC needs to trace). */ #define PSEUDOVECSIZE(type, nonlispfield) \ - ((OFFSETOF(type, nonlispfield) - OFFSETOF(struct Lisp_Vector, contents[0])) \ + ((offsetof(type, nonlispfield) - offsetof(struct Lisp_Vector, contents[0])) \ / sizeof (Lisp_Object)) /* A char-table is a kind of vectorlike, with contents are like a @@ -977,7 +971,8 @@ struct Lisp_Subr Lisp_Object (*a6) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); Lisp_Object (*a7) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); Lisp_Object (*a8) (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); - Lisp_Object (*am) (int, Lisp_Object *); + Lisp_Object (*aUNEVALLED) (Lisp_Object args); + Lisp_Object (*aMANY) (int, Lisp_Object *); } function; short min_args, max_args; const char *symbol_name; @@ -1781,7 +1776,8 @@ typedef struct { Lisp_Object fnname DEFUN_ARGS_ ## maxargs ; \ DECL_ALIGN (struct Lisp_Subr, sname) = \ { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ - (Lisp_Object(*)(void)) fnname, minargs, maxargs, lname, intspec, 0}; \ + { .a ## maxargs = fnname }, \ + minargs, maxargs, lname, intspec, 0}; \ Lisp_Object fnname /* Note that the weird token-substitution semantics of ANSI C makes @@ -2914,6 +2910,7 @@ extern void specbind (Lisp_Object, Lisp_Object); extern void record_unwind_protect (Lisp_Object (*) (Lisp_Object), Lisp_Object); extern Lisp_Object unbind_to (int, Lisp_Object); extern void error (const char *, ...) NO_RETURN; +extern void verror (const char *, va_list) NO_RETURN; extern void do_autoload (Lisp_Object, Lisp_Object); extern Lisp_Object un_autoload (Lisp_Object); EXFUN (Ffetch_bytecode, 1);