Mercurial > hg > xemacs-beta
diff src/elhash.c @ 3263:d674024a8674
[xemacs-hg @ 2006-02-27 16:29:00 by crestani]
- Introduce a fancy asynchronous finalization strategy on C level.
- Merge the code conditioned on MC_ALLOC into the code conditioned on
NEW_GC.
- Remove the possibility to free objects manually outside garbage
collections when the new collector is enabled.
author | crestani |
---|---|
date | Mon, 27 Feb 2006 16:29:29 +0000 |
parents | 141c2920ea48 |
children | aa28d959af41 |
line wrap: on
line diff
--- a/src/elhash.c Sun Feb 26 22:51:04 2006 +0000 +++ b/src/elhash.c Mon Feb 27 16:29:29 2006 +0000 @@ -417,9 +417,9 @@ #endif #ifdef ERROR_CHECK_STRUCTURES size_t size -#else +#else /* not (NEW_GC && ! ERROR_CHECK_STRUCTURES) */ size_t UNUSED (size) -#endif +#endif /* not (NEW_GC && ! ERROR_CHECK_STRUCTURES) */ ) { #ifdef NEW_GC @@ -443,6 +443,7 @@ #endif /* not NEW_GC */ } +#ifndef NEW_GC static void finalize_hash_table (void *header, int for_disksave) { @@ -453,6 +454,7 @@ ht->hentries = 0; } } +#endif /* not NEW_GC */ static const struct memory_description htentry_description_1[] = { { XD_LISP_OBJECT, offsetof (htentry, key) }, @@ -515,6 +517,14 @@ { XD_END } }; +#ifdef NEW_GC +DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table, + 1, /*dumpable-flag*/ + mark_hash_table, print_hash_table, + 0, hash_table_equal, hash_table_hash, + hash_table_description, + Lisp_Hash_Table); +#else /* not NEW_GC */ DEFINE_LRECORD_IMPLEMENTATION ("hash-table", hash_table, 1, /*dumpable-flag*/ mark_hash_table, print_hash_table, @@ -522,6 +532,7 @@ hash_table_equal, hash_table_hash, hash_table_description, Lisp_Hash_Table); +#endif /* not NEW_GC */ static Lisp_Hash_Table * xhash_table (Lisp_Object hash_table)