projects
/
chise
/
xemacs-chise.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(LEADING_BYTE_HIRAGANA_JISX0208): New macro.
[chise/xemacs-chise.git]
/
src
/
data.c
diff --git
a/src/data.c
b/src/data.c
index
4e4a274
..
20100db
100644
(file)
--- a/
src/data.c
+++ b/
src/data.c
@@
-59,9
+59,7
@@
Lisp_Object Qinteger_or_char_p, Qinteger_char_or_marker_p;
Lisp_Object Qnumberp, Qnumber_or_marker_p, Qnumber_char_or_marker_p;
Lisp_Object Qbit_vectorp, Qbitp, Qcons, Qkeyword, Qcdr, Qignore;
Lisp_Object Qnumberp, Qnumber_or_marker_p, Qnumber_char_or_marker_p;
Lisp_Object Qbit_vectorp, Qbitp, Qcons, Qkeyword, Qcdr, Qignore;
-#ifdef LISP_FLOAT_TYPE
Lisp_Object Qfloatp;
Lisp_Object Qfloatp;
-#endif
#ifdef DEBUG_XEMACS
#ifdef DEBUG_XEMACS
@@
-69,19
+67,14
@@
int debug_issue_ebola_notices;
int debug_ebola_backtrace_length;
int debug_ebola_backtrace_length;
-#if 0
-/*#ifndef LRECORD_SYMBOL*/
-#include "backtrace.h"
-#endif
-
int
eq_with_ebola_notice (Lisp_Object obj1, Lisp_Object obj2)
{
int
eq_with_ebola_notice (Lisp_Object obj1, Lisp_Object obj2)
{
- if (debug_issue_ebola_notices != -42 /* abracadabra */ &&
- (((CHARP (obj1) && INTP (obj2)) || (CHARP (obj2) && INTP (obj1)))
- && (debug_issue_ebola_notices >= 2
- || XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2))))
+ if (debug_issue_ebola_notices
+ && ((CHARP (obj1) && INTP (obj2)) || (CHARP (obj2) && INTP (obj1))))
{
{
+ /* #### It would be really nice if this were a proper warning
+ instead of brain-dead print ro Qexternal_debugging_output. */
write_c_string ("Comparison between integer and character is constant nil (",
Qexternal_debugging_output);
Fprinc (obj1, Qexternal_debugging_output);
write_c_string ("Comparison between integer and character is constant nil (",
Qexternal_debugging_output);
Fprinc (obj1, Qexternal_debugging_output);
@@
-130,9
+123,15
@@
PREDICATE. At that point, the gotten value is returned.
}
DOESNT_RETURN
}
DOESNT_RETURN
-pure_write_error (Lisp_Object obj)
+c_write_error (Lisp_Object obj)
{
{
- signal_simple_error ("Attempt to modify read-only object", obj);
+ signal_simple_error ("Attempt to modify read-only object (c)", obj);
+}
+
+DOESNT_RETURN
+lisp_write_error (Lisp_Object obj)
+{
+ signal_simple_error ("Attempt to modify read-only object (lisp)", obj);
}
DOESNT_RETURN
}
DOESNT_RETURN
@@
-546,22
+545,6
@@
Return a symbol representing the type of OBJECT.
{
switch (XTYPE (object))
{
{
switch (XTYPE (object))
{
-#ifndef LRECORD_CONS
- case Lisp_Type_Cons: return Qcons;
-#endif
-
-#ifndef LRECORD_SYMBOL
- case Lisp_Type_Symbol: return Qsymbol;
-#endif
-
-#ifndef LRECORD_STRING
- case Lisp_Type_String: return Qstring;
-#endif
-
-#ifndef LRECORD_VECTOR
- case Lisp_Type_Vector: return Qvector;
-#endif
-
case Lisp_Type_Record:
return intern (XRECORD_LHEADER_IMPLEMENTATION (object)->name);
case Lisp_Type_Record:
return intern (XRECORD_LHEADER_IMPLEMENTATION (object)->name);
@@
-632,7
+615,7
@@
Set the car of CONSCELL to be NEWCAR. Return NEWCAR.
if (!CONSP (conscell))
conscell = wrong_type_argument (Qconsp, conscell);
if (!CONSP (conscell))
conscell = wrong_type_argument (Qconsp, conscell);
- CHECK_IMPURE (conscell);
+ CHECK_LISP_WRITEABLE (conscell);
XCAR (conscell) = newcar;
return newcar;
}
XCAR (conscell) = newcar;
return newcar;
}
@@
-645,7
+628,7
@@
Set the cdr of CONSCELL to be NEWCDR. Return NEWCDR.
if (!CONSP (conscell))
conscell = wrong_type_argument (Qconsp, conscell);
if (!CONSP (conscell))
conscell = wrong_type_argument (Qconsp, conscell);
- CHECK_IMPURE (conscell);
+ CHECK_LISP_WRITEABLE (conscell);
XCDR (conscell) = newcdr;
return newcdr;
}
XCDR (conscell) = newcdr;
return newcdr;
}
@@
-774,7
+757,7
@@
ARRAY may be a vector, bit vector, or string. INDEX starts at 0.
if (idx < 0) goto range_error;
if (idx < 0) goto range_error;
- CHECK_IMPURE (array);
+ CHECK_LISP_WRITEABLE (array);
if (VECTORP (array))
{
if (VECTORP (array))
{
@@
-816,7
+799,7
@@
typedef struct
int int_p;
union
{
int int_p;
union
{
- int ival;
+ EMACS_INT ival;
double dval;
} c;
} int_or_double;
double dval;
} c;
} int_or_double;
@@
-1630,7
+1613,7
@@
make_weak_list (enum weak_list_type type)
{
Lisp_Object result;
struct weak_list *wl =
{
Lisp_Object result;
struct weak_list *wl =
- alloc_lcrecord_type (struct weak_list, lrecord_weak_list);
+ alloc_lcrecord_type (struct weak_list, &lrecord_weak_list);
wl->list = Qnil;
wl->type = type;
wl->list = Qnil;
wl->type = type;
@@
-1640,9
+1623,16
@@
make_weak_list (enum weak_list_type type)
return result;
}
return result;
}
+static const struct lrecord_description weak_list_description[] = {
+ { XD_LISP_OBJECT, offsetof(struct weak_list, list), 1 },
+ { XD_LISP_OBJECT, offsetof(struct weak_list, next_weak), 1 },
+ { XD_END }
+};
+
DEFINE_LRECORD_IMPLEMENTATION ("weak-list", weak_list,
mark_weak_list, print_weak_list,
0, weak_list_equal, weak_list_hash,
DEFINE_LRECORD_IMPLEMENTATION ("weak-list", weak_list,
mark_weak_list, print_weak_list,
0, weak_list_equal, weak_list_hash,
+ weak_list_description,
struct weak_list);
/*
-- we do not mark the list elements (either the elements themselves
struct weak_list);
/*
-- we do not mark the list elements (either the elements themselves
@@
-2219,7
+2209,7
@@
vars_of_data (void)
Vall_weak_lists = Qnil;
#ifdef DEBUG_XEMACS
Vall_weak_lists = Qnil;
#ifdef DEBUG_XEMACS
- DEFVAR_INT ("debug-issue-ebola-notices", &debug_issue_ebola_notices /*
+ DEFVAR_BOOL ("debug-issue-ebola-notices", &debug_issue_ebola_notices /*
If non-zero, note when your code may be suffering from char-int confoundance.
That is to say, if XEmacs encounters a usage of `eq', `memq', `equal',
etc. where an int and a char with the same value are being compared,
If non-zero, note when your code may be suffering from char-int confoundance.
That is to say, if XEmacs encounters a usage of `eq', `memq', `equal',
etc. where an int and a char with the same value are being compared,
@@
-2233,7
+2223,7
@@
have its chars and ints all confounded in the byte code, making it
impossible to accurately determine Ebola infection.
*/ );
impossible to accurately determine Ebola infection.
*/ );
- debug_issue_ebola_notices = 2; /* #### temporary hack */
+ debug_issue_ebola_notices = 0;
DEFVAR_INT ("debug-ebola-backtrace-length",
&debug_ebola_backtrace_length /*
DEFVAR_INT ("debug-ebola-backtrace-length",
&debug_ebola_backtrace_length /*