Mercurial > hg > xemacs-beta
comparison src/elhash.c @ 404:2f8bb876ab1d r21-2-32
Import from CVS: tag r21-2-32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:16:07 +0200 |
parents | a86b2b5e0111 |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
403:9f011ab08d48 | 404:2f8bb876ab1d |
---|---|
1216 | 1216 |
1217 | 1217 |
1218 /************************************************************************/ | 1218 /************************************************************************/ |
1219 /* garbage collecting weak hash tables */ | 1219 /* garbage collecting weak hash tables */ |
1220 /************************************************************************/ | 1220 /************************************************************************/ |
1221 #define MARK_OBJ(obj) do { \ | |
1222 Lisp_Object mo_obj = (obj); \ | |
1223 if (!marked_p (mo_obj)) \ | |
1224 { \ | |
1225 mark_object (mo_obj); \ | |
1226 did_mark = 1; \ | |
1227 } \ | |
1228 } while (0) | |
1229 | |
1221 | 1230 |
1222 /* Complete the marking for semi-weak hash tables. */ | 1231 /* Complete the marking for semi-weak hash tables. */ |
1223 int | 1232 int |
1224 finish_marking_weak_hash_tables (void) | 1233 finish_marking_weak_hash_tables (void) |
1225 { | 1234 { |
1239 continue; | 1248 continue; |
1240 | 1249 |
1241 /* Now, scan over all the pairs. For all pairs that are | 1250 /* Now, scan over all the pairs. For all pairs that are |
1242 half-marked, we may need to mark the other half if we're | 1251 half-marked, we may need to mark the other half if we're |
1243 keeping this pair. */ | 1252 keeping this pair. */ |
1244 #define MARK_OBJ(obj) \ | |
1245 do { if (!marked_p (obj)) mark_object (obj), did_mark = 1; } while (0) | |
1246 | |
1247 switch (ht->weakness) | 1253 switch (ht->weakness) |
1248 { | 1254 { |
1249 case HASH_TABLE_KEY_WEAK: | 1255 case HASH_TABLE_KEY_WEAK: |
1250 for (; e < sentinel; e++) | 1256 for (; e < sentinel; e++) |
1251 if (!HENTRY_CLEAR_P (e)) | 1257 if (!HENTRY_CLEAR_P (e)) |