comparison src/data.c @ 159:3bb7ccffb0c0 r20-3b6

Import from CVS: tag r20-3b6
author cvs
date Mon, 13 Aug 2007 09:41:43 +0200
parents 25f70ba0133c
children 28f395d8dc7a
comparison
equal deleted inserted replaced
158:558dfa75ffb3 159:3bb7ccffb0c0
75 75
76 int debug_issue_ebola_notices; 76 int debug_issue_ebola_notices;
77 77
78 int debug_ebola_backtrace_length; 78 int debug_ebola_backtrace_length;
79 79
80 #include "backtrace.h"
81
80 int 82 int
81 eq_with_ebola_notice (Lisp_Object obj1, Lisp_Object obj2) 83 eq_with_ebola_notice (Lisp_Object obj1, Lisp_Object obj2)
82 { 84 {
83 if (((CHARP (obj1) && INTP (obj2)) || (CHARP (obj2) && INTP (obj1))) 85 if (((CHARP (obj1) && INTP (obj2)) || (CHARP (obj2) && INTP (obj1)))
84 && (debug_issue_ebola_notices >= 2 86 && (debug_issue_ebola_notices >= 2
85 || XREALINT (obj1) == XREALINT (obj2))) 87 || XREALINT (obj1) == XREALINT (obj2)))
86 { 88 {
89 struct backtrace *bt = backtrace_list;
90 char *p;
87 /* Continuing the joke by printing `Ebola warning!!!' confuses */ 91 /* Continuing the joke by printing `Ebola warning!!!' confuses */
88 /* too many people. The message must be printed because Emacs used */ 92 /* too many people. The message must be printed because Emacs used */
89 /* to work differently for two decades. */ 93 /* to work differently for two decades. */
94 #ifndef LRECORD_SYMBOL
95 /* temporary hack that will probably be around too long -slb */
96 if (XTYPE(*bt->function) == Lisp_Symbol)
97 {
98 p = (XSYMBOL(*bt->function)->name)->_data;
99 if (!strcmp(p, "byte-compile-constant") ||
100 !strcmp(p, "byte-compile-constants-vector") ||
101 !strcmp(p, "byte-optimize-minus") ||
102 !strcmp(p, "byte-optimize-plus") ||
103 !strcmp(p, "byte-decompile-bytecode-1")) goto sc;
104 }
105 #endif
90 stderr_out("Comparison between integer and character is constant nil ("); 106 stderr_out("Comparison between integer and character is constant nil (");
91 Fprinc (obj1, Qexternal_debugging_output); 107 Fprinc (obj1, Qexternal_debugging_output);
92 stderr_out (" and "); 108 stderr_out (" and ");
93 Fprinc (obj2, Qexternal_debugging_output); 109 Fprinc (obj2, Qexternal_debugging_output);
94 stderr_out (")\n"); 110 stderr_out (")\n");
95 debug_short_backtrace (debug_ebola_backtrace_length); 111 debug_short_backtrace (debug_ebola_backtrace_length);
96 } 112 }
97 113 sc:
98 return EQ (obj1, obj2); 114 return EQ (obj1, obj2);
99 } 115 }
100 116
101 #endif /* DEBUG_XEMACS */ 117 #endif /* DEBUG_XEMACS */
102 118
2321 DEFVAR_INT ("debug-ebola-backtrace-length", 2337 DEFVAR_INT ("debug-ebola-backtrace-length",
2322 &debug_ebola_backtrace_length /* 2338 &debug_ebola_backtrace_length /*
2323 Length (in stack frames) of short backtrace printed out in Ebola notices. 2339 Length (in stack frames) of short backtrace printed out in Ebola notices.
2324 See `debug-issue-ebola-notices'. 2340 See `debug-issue-ebola-notices'.
2325 */ ); 2341 */ );
2326 debug_ebola_backtrace_length = 8; 2342 debug_ebola_backtrace_length = 32;
2327 2343
2328 #endif /* DEBUG_XEMACS */ 2344 #endif /* DEBUG_XEMACS */
2329 } 2345 }