Mercurial > hg > xemacs-beta
comparison src/data.c @ 207:e45d5e7c476e r20-4b2
Import from CVS: tag r20-4b2
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:03:52 +0200 |
parents | 3d6bfa290dbd |
children | 41ff10fd062f |
comparison
equal
deleted
inserted
replaced
206:d3e9274cbc4e | 207:e45d5e7c476e |
---|---|
85 int | 85 int |
86 eq_with_ebola_notice (Lisp_Object obj1, Lisp_Object obj2) | 86 eq_with_ebola_notice (Lisp_Object obj1, Lisp_Object obj2) |
87 { | 87 { |
88 if (((CHARP (obj1) && INTP (obj2)) || (CHARP (obj2) && INTP (obj1))) | 88 if (((CHARP (obj1) && INTP (obj2)) || (CHARP (obj2) && INTP (obj1))) |
89 && (debug_issue_ebola_notices >= 2 | 89 && (debug_issue_ebola_notices >= 2 |
90 || XREALINT (obj1) == XREALINT (obj2))) | 90 || XCHAR_OR_INT (obj1) == XCHAR_OR_INT (obj2))) |
91 { | 91 { |
92 stderr_out("Comparison between integer and character is constant nil ("); | 92 stderr_out("Comparison between integer and character is constant nil ("); |
93 Fprinc (obj1, Qexternal_debugging_output); | 93 Fprinc (obj1, Qexternal_debugging_output); |
94 stderr_out (" and "); | 94 stderr_out (" and "); |
95 Fprinc (obj2, Qexternal_debugging_output); | 95 Fprinc (obj2, Qexternal_debugging_output); |
164 #ifndef make_int | 164 #ifndef make_int |
165 Lisp_Object | 165 Lisp_Object |
166 make_int (EMACS_INT num) | 166 make_int (EMACS_INT num) |
167 { | 167 { |
168 Lisp_Object val; | 168 Lisp_Object val; |
169 #ifdef USE_MINIMAL_TAGBITS | |
170 XSETINT(val, num); | |
171 #else | |
169 /* Don't use XSETINT here -- it's defined in terms of make_int (). */ | 172 /* Don't use XSETINT here -- it's defined in terms of make_int (). */ |
170 XSETOBJ (val, Lisp_Type_Int, num); | 173 XSETOBJ (val, Lisp_Type_Int, num); |
174 #endif | |
171 return val; | 175 return val; |
172 } | 176 } |
173 #endif /* ! defined (make_int) */ | 177 #endif /* ! defined (make_int) */ |
174 | 178 |
175 /* On some machines, XINT needs a temporary location. | 179 /* On some machines, XINT needs a temporary location. |
189 return num & ((1L << VALBITS) - 1); | 193 return num & ((1L << VALBITS) - 1); |
190 } | 194 } |
191 | 195 |
192 /* characters do not need to sign extend so there's no need for special | 196 /* characters do not need to sign extend so there's no need for special |
193 futzing like with ints. */ | 197 futzing like with ints. */ |
198 #ifndef make_char | |
194 Lisp_Object | 199 Lisp_Object |
195 make_char (Emchar num) | 200 make_char (Emchar num) |
196 { | 201 { |
197 Lisp_Object val; | 202 Lisp_Object val; |
203 #ifdef USE_MINIMAL_TAGBITS | |
204 XSETCHAR (val, num); | |
205 #else | |
198 XSETOBJ (val, Lisp_Type_Char, num); | 206 XSETOBJ (val, Lisp_Type_Char, num); |
207 #endif | |
199 return val; | 208 return val; |
200 } | 209 } |
210 #endif /* ! make_char */ | |
201 | 211 |
202 /* Data type predicates */ | 212 /* Data type predicates */ |
203 | 213 |
204 DEFUN ("eq", Feq, 2, 2, 0, /* | 214 DEFUN ("eq", Feq, 2, 2, 0, /* |
205 T if the two args are the same Lisp object. | 215 T if the two args are the same Lisp object. |
1639 CHECK_INT_COERCE_CHAR (value); | 1649 CHECK_INT_COERCE_CHAR (value); |
1640 CHECK_INT (count); | 1650 CHECK_INT (count); |
1641 | 1651 |
1642 { | 1652 { |
1643 int C_count = XINT (count); | 1653 int C_count = XINT (count); |
1644 EMACS_UINT C_value = (EMACS_UINT) XUINT (value); | 1654 /* EMACS_UINT C_value = (EMACS_UINT) XUINT (value);*/ |
1655 EMACS_UINT C_value = (EMACS_UINT) XINT (value); | |
1645 XSETINT (val, C_count > 0 ? C_value << C_count : C_value >> -C_count); | 1656 XSETINT (val, C_count > 0 ? C_value << C_count : C_value >> -C_count); |
1646 } | 1657 } |
1647 return val; | 1658 return val; |
1648 } | 1659 } |
1649 | 1660 |