# HG changeset patch # User crestani # Date 1119958335 0 # Node ID 172fb92bd15694a4371c0f76648e0c34cfc24d61 # Parent 3a7b185f1a2e344233f9536aafc7a3e66c09b3e4 [xemacs-hg @ 2005-06-28 11:32:13 by crestani] 2005-06-28 Marcus Crestani * 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. diff -r 3a7b185f1a2e -r 172fb92bd156 src/ChangeLog --- a/src/ChangeLog Mon Jun 27 21:51:16 2005 +0000 +++ b/src/ChangeLog Tue Jun 28 11:32:15 2005 +0000 @@ -1,3 +1,14 @@ +2005-06-28 Marcus Crestani + + * 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. + 2005-06-26 Aidan Kehoe * event-stream.c (command_builder_find_leaf): diff -r 3a7b185f1a2e -r 172fb92bd156 src/gpmevent.c --- a/src/gpmevent.c Mon Jun 27 21:51:16 2005 +0000 +++ b/src/gpmevent.c Tue Jun 28 11:32:15 2005 +0000 @@ -59,10 +59,6 @@ static Lisp_Object gpm_event_queue; static Lisp_Object gpm_event_queue_tail; -#ifdef MC_ALLOC -static Lisp_Object MC_ALLOC_Freceive_gpm_event; -#endif /* MC_ALLOC */ - struct __gpm_state { int gpm_tried; @@ -597,11 +593,7 @@ { rval = 0; Fprocess_kill_without_query (gpm_process, Qnil); -#ifdef MC_ALLOC - gpm_filter = MC_ALLOC_Freceive_gpm_event; -#else /* not MC_ALLOC */ - gpm_filter = wrap_subr (&SFreceive_gpm_event); -#endif /* not MC_ALLOC */ + gpm_filter = GET_DEFUN_LISP_OBJECT (Freceive_gpm_event); set_process_filter (gpm_process, gpm_filter, 1, 0); /* Keep track of the device for later */ @@ -629,17 +621,7 @@ void syms_of_gpmevent (void) { -#ifdef MC_ALLOC -#define DEFSUBR_receive_gpm_event(Fname) \ -do { \ - DEFSUBR_MC_ALLOC (Fname); \ - defsubr (S##Fname); \ - MC_ALLOC_Freceive_gpm_event = wrap_subr (S##Fname); \ -} while (0) - DEFSUBR_receive_gpm_event (Freceive_gpm_event); -#else /* not MC_ALLOC */ DEFSUBR (Freceive_gpm_event); -#endif /* not MC_ALLOC */ DEFSUBR (Fgpm_enable); DEFSUBR (Fgpm_enabled_p); } diff -r 3a7b185f1a2e -r 172fb92bd156 src/lisp.h --- a/src/lisp.h Mon Jun 27 21:51:16 2005 +0000 +++ b/src/lisp.h Tue Jun 28 11:32:15 2005 +0000 @@ -3016,6 +3016,8 @@ }; \ static struct Lisp_Subr *S##Fname; \ DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist) +#define GET_DEFUN_LISP_OBJECT(Fname) \ + wrap_subr (S##Fname); #else /* not MC_ALLOC */ #define DEFUN(lname, Fname, min_args, max_args, prompt, arglist) \ Lisp_Object Fname (EXFUN_##max_args); \ @@ -3056,6 +3058,8 @@ (lisp_fn_t) Fname \ }; \ DOESNT_RETURN_TYPE (Lisp_Object) Fname (DEFUN_##max_args arglist) +#define GET_DEFUN_LISP_OBJECT(Fname) \ + wrap_subr (&S##Fname); #endif /* not MC_ALLOC */ /* Heavy ANSI C preprocessor hackery to get DEFUN to declare a diff -r 3a7b185f1a2e -r 172fb92bd156 src/tooltalk.c --- a/src/tooltalk.c Mon Jun 27 21:51:16 2005 +0000 +++ b/src/tooltalk.c Tue Jun 28 11:32:15 2005 +0000 @@ -1289,7 +1289,7 @@ { /* Don't ask the user for confirmation when exiting Emacs */ Fprocess_kill_without_query (lp, Qnil); - fil = wrap_subr (&SFreceive_tooltalk_message); + fil = GET_DEFUN_LISP_OBJECT (Freceive_tooltalk_message); set_process_filter (lp, fil, 1, 0); } else