comparison src/lisp.h @ 2834:172fb92bd156

[xemacs-hg @ 2005-06-28 11:32:13 by crestani] 2005-06-28 Marcus Crestani <crestani@xemacs.org> * gpmevent.c: Remove workaround. * gpmevent.c (Fgpm_enable): Use GET_DEFUN_LISP_OBJECT to get Lisp_Object of a built-in function. * gpmevent.c (syms_of_gpmevent): Remove workaround. * lisp.h (GET_DEFUN_LISP_OBJECT): New. Returns Lisp_Object of a DEFUN. * tooltalk.c (init_tooltalk): Use GET_DEFUN_LISP_OBJECT to get Lisp_Object of a built-in function.
author crestani
date Tue, 28 Jun 2005 11:32:15 +0000
parents a25c824ed558
children b95fe16005fd
comparison
equal deleted inserted replaced
2833:3a7b185f1a2e 2834:172fb92bd156
3014 lname, \ 3014 lname, \
3015 (lisp_fn_t) Fname \ 3015 (lisp_fn_t) Fname \
3016 }; \ 3016 }; \
3017 static struct Lisp_Subr *S##Fname; \ 3017 static struct Lisp_Subr *S##Fname; \
3018 DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist) 3018 DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist)
3019 #define GET_DEFUN_LISP_OBJECT(Fname) \
3020 wrap_subr (S##Fname);
3019 #else /* not MC_ALLOC */ 3021 #else /* not MC_ALLOC */
3020 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ 3022 #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \
3021 Lisp_Object Fname (EXFUN_##max_args); \ 3023 Lisp_Object Fname (EXFUN_##max_args); \
3022 static struct Lisp_Subr S##Fname = \ 3024 static struct Lisp_Subr S##Fname = \
3023 { \ 3025 { \
3054 0, /* doc string */ \ 3056 0, /* doc string */ \
3055 lname, \ 3057 lname, \
3056 (lisp_fn_t) Fname \ 3058 (lisp_fn_t) Fname \
3057 }; \ 3059 }; \
3058 DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist) 3060 DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist)
3061 #define GET_DEFUN_LISP_OBJECT(Fname) \
3062 wrap_subr (&S##Fname);
3059 #endif /* not MC_ALLOC */ 3063 #endif /* not MC_ALLOC */
3060 3064
3061 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a 3065 /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a
3062 prototype that matches max_args, and add the obligatory 3066 prototype that matches max_args, and add the obligatory
3063 `Lisp_Object' type declaration to the formal C arguments. */ 3067 `Lisp_Object' type declaration to the formal C arguments. */