comparison 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
comparison
equal deleted inserted replaced
4981:4aebb0131297 4982:3c3c1d139863
1302 1302
1303 /* Basic free function */ 1303 /* Basic free function */
1304 1304
1305 MODULE_API void xfree_1 (void *); 1305 MODULE_API void xfree_1 (void *);
1306 #ifdef ERROR_CHECK_MALLOC 1306 #ifdef ERROR_CHECK_MALLOC
1307 /* This used to use a temporary variable, which both avoided the multiple 1307 /* This used to use a temporary variable. But that triggered
1308 evaluation and obviated the need for the TYPE argument. But that triggered
1309 complaints under strict aliasing. #### There should be a better way. */ 1308 complaints under strict aliasing. #### There should be a better way. */
1310 #define xfree(lvalue, type) do \ 1309 #define xfree(lvalue) do \
1311 { \ 1310 { \
1312 xfree_1 (lvalue); \ 1311 xfree_1 (lvalue); \
1313 VOIDP_CAST (lvalue) = (void *) DEADBEEF_CONSTANT; \ 1312 VOIDP_CAST (lvalue) = (void *) DEADBEEF_CONSTANT; \
1314 } while (0) 1313 } while (0)
1315 #else 1314 #else
1316 #define xfree(lvalue,type) xfree_1 (lvalue) 1315 #define xfree(lvalue) xfree_1 (lvalue)
1317 #endif /* ERROR_CHECK_MALLOC */ 1316 #endif /* ERROR_CHECK_MALLOC */
1318 1317
1319 /* ------------------------ stack allocation -------------------------- */ 1318 /* ------------------------ stack allocation -------------------------- */
1320 1319
1321 /* Allocating excessively large blocks on the stack can cause crashes. 1320 /* Allocating excessively large blocks on the stack can cause crashes.
4299 4298
4300 #else 4299 #else
4301 4300
4302 /* Call staticpro (&var) to protect static variable `var'. */ 4301 /* Call staticpro (&var) to protect static variable `var'. */
4303 MODULE_API void staticpro (Lisp_Object *); 4302 MODULE_API void staticpro (Lisp_Object *);
4303 /* staticpro_1 (varptr, name) is used when we're not directly calling
4304 staticpro() on the address of a Lisp variable, but on a pointer we
4305 got from elsewhere. In that case, NAME is a string describing the
4306 actual variable in question. NAME is used only for debugging purposes,
4307 and hence when not DEBUG_XEMACS, staticpro_1() just calls staticpro().
4308 With DEBUG_XEMACS, however, it's the reverse -- staticpro() calls
4309 staticpro_1(), using the ANSI "stringize" operator to construct a string
4310 out of the variable name. */
4311 #define staticpro_1(ptr, name) staticpro (ptr)
4304 4312
4305 /* Call staticpro_nodump (&var) to protect static variable `var'. */ 4313 /* Call staticpro_nodump (&var) to protect static variable `var'. */
4306 /* var will not be saved at dump time */ 4314 /* var will not be saved at dump time */
4307 MODULE_API void staticpro_nodump (Lisp_Object *); 4315 MODULE_API void staticpro_nodump (Lisp_Object *);
4316 #define staticpro_nodump_1(ptr, name) staticpro_nodump (ptr)
4308 4317
4309 #ifdef HAVE_SHLIB 4318 #ifdef HAVE_SHLIB
4310 /* Call unstaticpro_nodump (&var) to stop protecting static variable `var'. */ 4319 /* Call unstaticpro_nodump (&var) to stop protecting static variable `var'. */
4311 MODULE_API void unstaticpro_nodump (Lisp_Object *); 4320 MODULE_API void unstaticpro_nodump (Lisp_Object *);
4312 #endif 4321 #endif