XEmacs 21.4.9 "Informed Management".
[chise/xemacs-chise.git.1] / src / backtrace.h
index 1f57911..7ca942b 100644 (file)
@@ -30,8 +30,8 @@ Boston, MA 02111-1307, USA.  */
    Mly (probably) or JWZ: Some changes.
  */
 
-#ifndef _XEMACS_BACKTRACE_H_
-#define _XEMACS_BACKTRACE_H_
+#ifndef INCLUDED_backtrace_h_
+#define INCLUDED_backtrace_h_
 
 #include <setjmp.h>
 
@@ -147,7 +147,7 @@ extern struct backtrace *backtrace_list;
 /* Most callers should simply use specbind() and unbind_to(), but if
    speed is REALLY IMPORTANT, you can use the faster macros below */
 void specbind_magic (Lisp_Object, Lisp_Object);
-void grow_specpdl (size_t reserved);
+void grow_specpdl (EMACS_INT reserved);
 void unbind_to_hairy (int);
 extern int specpdl_size;
 
@@ -158,7 +158,7 @@ extern int specpdl_size;
   Lisp_Object SB_symbol = (symbol_object);                             \
   Lisp_Object SB_newval = (value_object);                              \
   Lisp_Object SB_oldval;                                               \
-  struct Lisp_Symbol *SB_sym;                                          \
+  Lisp_Symbol *SB_sym;                                                 \
                                                                        \
   SPECPDL_RESERVE (1);                                                 \
                                                                        \
@@ -168,7 +168,7 @@ extern int specpdl_size;
                                                                        \
   if (!SYMBOL_VALUE_MAGIC_P (SB_oldval) || UNBOUNDP (SB_oldval))       \
     {                                                                  \
-      /* ### the following test will go away when we have a constant   \
+      /* #### the following test will go away when we have a constant  \
          symbol magic object */                                                \
       if (EQ (SB_symbol, Qnil) ||                                      \
          EQ (SB_symbol, Qt)   ||                                       \
@@ -197,7 +197,7 @@ extern int specpdl_size;
 #define SPECBIND_FAST_UNSAFE(symbol_object, value_object) do {         \
   Lisp_Object SFU_symbol = (symbol_object);                            \
   Lisp_Object SFU_newval = (value_object);                             \
-  struct Lisp_Symbol *SFU_sym = XSYMBOL (SFU_symbol);                  \
+  Lisp_Symbol *SFU_sym   = XSYMBOL (SFU_symbol);                       \
   Lisp_Object SFU_oldval = SFU_sym->value;                             \
   if (!SYMBOL_VALUE_MAGIC_P (SFU_oldval) || UNBOUNDP (SFU_oldval))     \
     {                                                                  \
@@ -214,8 +214,9 @@ extern int specpdl_size;
 } while (0)
 
 /* Request enough room for SIZE future entries on special binding stack */
+/* SR_size will typically be compared to an unsigned short */
 #define SPECPDL_RESERVE(size) do {                     \
-  size_t SR_size = (size);                             \
+  EMACS_INT SR_size = (size);                          \
   if (specpdl_depth() + SR_size >= specpdl_size)       \
     grow_specpdl (SR_size);                            \
 } while (0)
@@ -230,7 +231,7 @@ extern int specpdl_size;
   int UNBIND_TO_count = (count);                       \
   while (specpdl_depth_counter != UNBIND_TO_count)     \
     {                                                  \
-      struct Lisp_Symbol *sym;                         \
+      Lisp_Symbol *sym;                                        \
       --specpdl_ptr;                                   \
       --specpdl_depth_counter;                         \
                                                        \
@@ -255,7 +256,7 @@ extern int specpdl_size;
   int UNBIND_TO_count = (count);                       \
   while (specpdl_depth_counter != UNBIND_TO_count)     \
     {                                                  \
-      struct Lisp_Symbol *sym;                         \
+      Lisp_Symbol *sym;                                        \
       --specpdl_ptr;                                   \
       --specpdl_depth_counter;                         \
                                                        \
@@ -277,6 +278,9 @@ extern int specpdl_size;
 #define CHECK_SPECBIND_VARIABLE DO_NOTHING
 #endif
 
+#if 0
+/* Unused.  It's too hard to guarantee that the current bindings
+   contain only variables.  */
 /* Another inline version of unbind_to().  VALUE is GC-protected.
    Caller guarantees that:
    - all of the elements on the binding stack are variable bindings.
@@ -285,7 +289,7 @@ extern int specpdl_size;
   int UNBIND_TO_count = (count);                               \
   while (specpdl_depth_counter != UNBIND_TO_count)             \
     {                                                          \
-      struct Lisp_Symbol *sym;                                 \
+      Lisp_Symbol *sym;                                                \
       --specpdl_ptr;                                           \
       --specpdl_depth_counter;                                 \
                                                                \
@@ -303,6 +307,7 @@ extern int specpdl_size;
        }                                                       \
     }                                                          \
 } while (0)
+#endif /* unused */
 
 /* A faster, but less safe inline version of Fset().
    Caller guarantees that:
@@ -311,7 +316,7 @@ extern int specpdl_size;
 #define FSET_FAST_UNSAFE(sym, newval) do {                             \
   Lisp_Object FFU_sym = (sym);                                         \
   Lisp_Object FFU_newval = (newval);                                   \
-  struct Lisp_Symbol *FFU_symbol = XSYMBOL (FFU_sym);                  \
+  Lisp_Symbol *FFU_symbol = XSYMBOL (FFU_sym);                         \
   Lisp_Object FFU_oldval = FFU_symbol->value;                          \
   if (!SYMBOL_VALUE_MAGIC_P (FFU_oldval) || UNBOUNDP (FFU_oldval))     \
     FFU_symbol->value = FFU_newval;                                    \
@@ -319,4 +324,4 @@ extern int specpdl_size;
     Fset (FFU_sym, FFU_newval);                                                \
 } while (0)
 
-#endif /* _XEMACS_BACKTRACE_H_ */
+#endif /* INCLUDED_backtrace_h_ */