Mercurial > hg > xemacs-beta
comparison src/symbols.c @ 245:51092a27c943 r20-5b21
Import from CVS: tag r20-5b21
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:17:54 +0200 |
parents | f955c73f5258 |
children | e70b3a057e12 |
comparison
equal
deleted
inserted
replaced
244:78d4f1140794 | 245:51092a27c943 |
---|---|
100 struct Lisp_Symbol *sym = XSYMBOL (obj); | 100 struct Lisp_Symbol *sym = XSYMBOL (obj); |
101 Lisp_Object pname; | 101 Lisp_Object pname; |
102 | 102 |
103 ((markobj) (sym->value)); | 103 ((markobj) (sym->value)); |
104 ((markobj) (sym->function)); | 104 ((markobj) (sym->function)); |
105 /* DON'T mark through ->obarray slot. Since the slot is not visible | |
106 from Lisp, it would be wrong not to gc an obarray vector only | |
107 because there are symbols pointing to it. This is safe, because | |
108 we only check the nil-ness of the object. An implication of this | |
109 is that, when the obarray vector is gc-ed, its symbols are still | |
110 considered "interned" for printing purposes -- but it's probably | |
111 no big deal. */ | |
112 /*((markobj) (sym->obarray));*/ | |
105 XSETSTRING (pname, sym->name); | 113 XSETSTRING (pname, sym->name); |
106 ((markobj) (pname)); | 114 ((markobj) (pname)); |
107 if (!symbol_next (sym)) | 115 if (!symbol_next (sym)) |
108 return sym->plist; | 116 return sym->plist; |
109 else | 117 else |
189 ptr = &XVECTOR_DATA (obarray)[XINT (sym)]; | 197 ptr = &XVECTOR_DATA (obarray)[XINT (sym)]; |
190 | 198 |
191 if (purify_flag && ! purified (str)) | 199 if (purify_flag && ! purified (str)) |
192 str = make_pure_pname (XSTRING_DATA (str), len, 0); | 200 str = make_pure_pname (XSTRING_DATA (str), len, 0); |
193 sym = Fmake_symbol (str); | 201 sym = Fmake_symbol (str); |
202 XSYMBOL (sym)->obarray = obarray; | |
194 | 203 |
195 if (SYMBOLP (*ptr)) | 204 if (SYMBOLP (*ptr)) |
196 symbol_next (XSYMBOL (sym)) = XSYMBOL (*ptr); | 205 symbol_next (XSYMBOL (sym)) = XSYMBOL (*ptr); |
197 else | 206 else |
198 symbol_next (XSYMBOL (sym)) = 0; | 207 symbol_next (XSYMBOL (sym)) = 0; |
273 XSYMBOL (tail)->next = XSYMBOL (following)->next; | 282 XSYMBOL (tail)->next = XSYMBOL (following)->next; |
274 break; | 283 break; |
275 } | 284 } |
276 } | 285 } |
277 } | 286 } |
278 | 287 XSYMBOL (tem)->obarray = Qnil; |
279 return Qt; | 288 return Qt; |
280 } | 289 } |
281 | 290 |
282 /* Return the symbol in OBARRAY whose names matches the string | 291 /* Return the symbol in OBARRAY whose names matches the string |
283 of SIZE characters at PTR. If there is no such symbol in OBARRAY, | 292 of SIZE characters at PTR. If there is no such symbol in OBARRAY, |
3154 hash = hash_string (string_data (XSYMBOL (Qnil)->name), 3); | 3163 hash = hash_string (string_data (XSYMBOL (Qnil)->name), 3); |
3155 /* Separate statement here to avoid VAXC bug. */ | 3164 /* Separate statement here to avoid VAXC bug. */ |
3156 hash %= OBARRAY_SIZE; | 3165 hash %= OBARRAY_SIZE; |
3157 tem = &XVECTOR_DATA (Vobarray)[hash]; | 3166 tem = &XVECTOR_DATA (Vobarray)[hash]; |
3158 *tem = Qnil; | 3167 *tem = Qnil; |
3168 XSYMBOL (Qnil)->obarray = Vobarray; | |
3159 } | 3169 } |
3160 | 3170 |
3161 { | 3171 { |
3162 /* Required to get around a GCC syntax error on certain | 3172 /* Required to get around a GCC syntax error on certain |
3163 architectures */ | 3173 architectures */ |