Mercurial > emacs
diff src/lisp.h @ 105872:89183b6f6e9d
* process.c (socket_options): Make it const.
(set_socket_option, init_process): Use a const pointer.
* lread.c (intern_c_string): New function.
(defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Uset it. Make the name const char*.
* lisp.h (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool)
(defvar_int): Update prototypes.
(DEFUN, EXFUN): Support for prototypes is now required.
(intern_c_string): New prototype.
(struct Lisp_Subr): Make symbol_name constant.
* font.c (struct table_entry): Remove unused member. Make NAMES
constant.
(weight_table, slant_table, width_table): Make constant.
* emacs.c (struct standard_args): Make name and longname constant.
* character.h (DEFSYM): Use intern_c_string.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Fri, 06 Nov 2009 06:07:46 +0000 |
parents | 0d3a156a5458 |
children | 8103235103a7 |
line wrap: on
line diff
--- a/src/lisp.h Fri Nov 06 05:24:28 2009 +0000 +++ b/src/lisp.h Fri Nov 06 06:07:46 2009 +0000 @@ -922,7 +922,7 @@ EMACS_UINT size; Lisp_Object (*function) (); short min_args, max_args; - char *symbol_name; + const char *symbol_name; char *intspec; char *doc; }; @@ -1701,17 +1701,6 @@ A null string means call interactively with no arguments. `doc' is documentation for the user. */ -#if (!defined (__STDC__) && !defined (PROTOTYPES)) - -#define DEFUN(lname, fnname, sname, minargs, maxargs, intspec, doc) \ - Lisp_Object fnname (); \ - DECL_ALIGN (struct Lisp_Subr, sname) = \ - { PVEC_SUBR | (sizeof (struct Lisp_Subr) / sizeof (EMACS_INT)), \ - fnname, minargs, maxargs, lname, intspec, 0}; \ - Lisp_Object fnname - -#else - /* 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) \ @@ -1738,8 +1727,6 @@ Lisp_Object, Lisp_Object, Lisp_Object) #define DEFUN_ARGS_8 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, \ Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object) -#endif - /* Non-zero if OBJ is a Lisp function. */ #define FUNCTIONP(OBJ) \ @@ -1755,11 +1742,11 @@ #define MANY -2 #define UNEVALLED -1 -extern void defvar_lisp P_ ((char *, Lisp_Object *)); -extern void defvar_lisp_nopro P_ ((char *, Lisp_Object *)); -extern void defvar_bool P_ ((char *, int *)); -extern void defvar_int P_ ((char *, EMACS_INT *)); -extern void defvar_kboard P_ ((char *, int)); +extern void defvar_lisp (const char *, Lisp_Object *); +extern void defvar_lisp_nopro (const char *, Lisp_Object *); +extern void defvar_bool (const char *, int *); +extern void defvar_int (const char *, EMACS_INT *); +extern void defvar_kboard (const char *, int); /* Macros we use to define forwarded Lisp variables. These are used in the syms_of_FILENAME functions. */ @@ -2185,15 +2172,10 @@ /* Declare a Lisp-callable function. The MAXARGS parameter has the same meaning as in the DEFUN macro, and is used to construct a prototype. */ -#if (!defined (__STDC__) && !defined (PROTOTYPES)) -#define EXFUN(fnname, maxargs) \ - extern Lisp_Object fnname () -#else /* We can use the same trick as in the DEFUN macro to generate the appropriate prototype. */ #define EXFUN(fnname, maxargs) \ extern Lisp_Object fnname DEFUN_ARGS_ ## maxargs -#endif /* Forward declarations for prototypes. */ struct window; @@ -2654,6 +2636,7 @@ extern Lisp_Object make_specified_string P_ ((const char *, int, int, int)); EXFUN (Fpurecopy, 1); extern Lisp_Object make_pure_string P_ ((char *, int, int, int)); +extern Lisp_Object make_pure_c_string (const char *data); extern Lisp_Object pure_cons P_ ((Lisp_Object, Lisp_Object)); extern Lisp_Object make_pure_vector P_ ((EMACS_INT)); EXFUN (Fgarbage_collect, 0); @@ -2752,6 +2735,7 @@ EXFUN (Feval_region, 4); extern Lisp_Object check_obarray P_ ((Lisp_Object)); extern Lisp_Object intern P_ ((const char *)); +extern Lisp_Object intern_c_string (const char *); extern Lisp_Object make_symbol P_ ((char *)); extern Lisp_Object oblookup P_ ((Lisp_Object, const char *, int, int)); #define LOADHIST_ATTACH(x) \