changeset 4979:4234fd5a7b17

fix bug #668 (compile error, not --with-debug) -------------------- ChangeLog entries follow: -------------------- src/ChangeLog addition: 2010-02-05 Ben Wing <ben@xemacs.org> * lisp.h: * lisp.h (staticpro_nodump_1): Define staticpro_1 and staticpro_nodump_1 when not XEMACS_DEBUG. * symbols.c (defsymbol_massage_name_1): * symbols.c (defsymbol_massage_multiword_predicate): Cosmetic fixes.
author Ben Wing <ben@xemacs.org>
date Fri, 05 Feb 2010 08:09:03 -0600
parents f48bf636045f
children 931aaa7a6b37 3c3c1d139863 f23cd0184dcf
files src/ChangeLog src/lisp.h src/symbols.c
diffstat 3 files changed, 24 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Fri Feb 05 05:04:43 2010 -0600
+++ b/src/ChangeLog	Fri Feb 05 08:09:03 2010 -0600
@@ -1,3 +1,13 @@
+2010-02-05  Ben Wing  <ben@xemacs.org>
+
+	* lisp.h:
+	* lisp.h (staticpro_nodump_1):
+	Define staticpro_1 and staticpro_nodump_1 when not XEMACS_DEBUG.
+	
+	* symbols.c (defsymbol_massage_name_1):
+	* symbols.c (defsymbol_massage_multiword_predicate):
+	Cosmetic fixes.
+
 2010-02-05  Ben Wing  <ben@xemacs.org>
 
 	* bytecode.c (bytecode_assert):
--- a/src/lisp.h	Fri Feb 05 05:04:43 2010 -0600
+++ b/src/lisp.h	Fri Feb 05 08:09:03 2010 -0600
@@ -4300,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'. */
--- a/src/symbols.c	Fri Feb 05 05:04:43 2010 -0600
+++ b/src/symbols.c	Fri Feb 05 08:09:03 2010 -0600
@@ -3599,8 +3599,8 @@
 }
 
 static void
-defsymbol_massage_name_1 (Lisp_Object *location, const Ascbyte *name, int dump_p,
-			  int multiword_predicate_p)
+defsymbol_massage_name_1 (Lisp_Object *location, const Ascbyte *name,
+			  int dump_p, int multiword_predicate_p)
 {
   char temp[500];
   int len = strlen (name) - 1;
@@ -3646,7 +3646,8 @@
 }
 
 void
-defsymbol_massage_multiword_predicate (Lisp_Object *location, const Ascbyte *name)
+defsymbol_massage_multiword_predicate (Lisp_Object *location,
+				       const Ascbyte *name)
 {
   defsymbol_massage_name_1 (location, name, 1, 1);
 }