Mercurial > hg > xemacs-beta
diff src/lisp.h @ 4982:3c3c1d139863
Automatic merge
author | Ben Wing <ben@xemacs.org> |
---|---|
date | Fri, 05 Feb 2010 11:25:00 -0600 |
parents | 4aebb0131297 4234fd5a7b17 |
children | b46c89ccbed3 44d7bde26046 |
line wrap: on
line diff
--- a/src/lisp.h Fri Feb 05 11:02:24 2010 -0600 +++ b/src/lisp.h Fri Feb 05 11:25:00 2010 -0600 @@ -1304,16 +1304,15 @@ MODULE_API void xfree_1 (void *); #ifdef ERROR_CHECK_MALLOC -/* This used to use a temporary variable, which both avoided the multiple - evaluation and obviated the need for the TYPE argument. But that triggered +/* This used to use a temporary variable. But that triggered complaints under strict aliasing. #### There should be a better way. */ -#define xfree(lvalue, type) do \ +#define xfree(lvalue) do \ { \ xfree_1 (lvalue); \ VOIDP_CAST (lvalue) = (void *) DEADBEEF_CONSTANT; \ } while (0) #else -#define xfree(lvalue,type) xfree_1 (lvalue) +#define xfree(lvalue) xfree_1 (lvalue) #endif /* ERROR_CHECK_MALLOC */ /* ------------------------ stack allocation -------------------------- */ @@ -4301,10 +4300,20 @@ /* Call staticpro (&var) to protect static variable `var'. */ MODULE_API void staticpro (Lisp_Object *); +/* staticpro_1 (varptr, name) is used when we're not directly calling + staticpro() on the address of a Lisp variable, but on a pointer we + got from elsewhere. In that case, NAME is a string describing the + actual variable in question. NAME is used only for debugging purposes, + and hence when not DEBUG_XEMACS, staticpro_1() just calls staticpro(). + With DEBUG_XEMACS, however, it's the reverse -- staticpro() calls + staticpro_1(), using the ANSI "stringize" operator to construct a string + out of the variable name. */ +#define staticpro_1(ptr, name) staticpro (ptr) /* Call staticpro_nodump (&var) to protect static variable `var'. */ /* var will not be saved at dump time */ MODULE_API void staticpro_nodump (Lisp_Object *); +#define staticpro_nodump_1(ptr, name) staticpro_nodump (ptr) #ifdef HAVE_SHLIB /* Call unstaticpro_nodump (&var) to stop protecting static variable `var'. */