diff src/specifier.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 98af8a976fc3
line wrap: on
line diff
--- a/src/specifier.c	Sun Feb 26 22:51:04 2006 +0000
+++ b/src/specifier.c	Mon Feb 27 16:29:29 2006 +0000
@@ -295,6 +295,7 @@
   write_fmt_string (printcharfun, " 0x%x>", sp->header.uid);
 }
 
+#ifndef NEW_GC
 static void
 finalize_specifier (void *header, int for_disksave)
 {
@@ -302,14 +303,11 @@
   /* don't be snafued by the disksave finalization. */
   if (!for_disksave && !GHOST_SPECIFIER_P(sp) && sp->caching)
     {
-#ifdef NEW_GC
-      mc_free (sp->caching);
-#else /* not NEW_GC */
       xfree (sp->caching, struct specifier_caching *);
-#endif /* not NEW_GC */
       sp->caching = 0;
     }
 }
+#endif /* not NEW_GC */
 
 static int
 specifier_equal (Lisp_Object obj1, Lisp_Object obj2, int depth)
@@ -438,6 +436,15 @@
   0, specifier_empty_extra_description_1
 };
 
+#ifdef NEW_GC
+DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier,
+					1, /*dumpable-flag*/
+					mark_specifier, print_specifier,
+					0, specifier_equal, specifier_hash,
+					specifier_description,
+					sizeof_specifier,
+					Lisp_Specifier);
+#else /* not NEW_GC */
 DEFINE_LRECORD_SEQUENCE_IMPLEMENTATION ("specifier", specifier,
 					1, /*dumpable-flag*/
 					mark_specifier, print_specifier,
@@ -446,6 +453,7 @@
 					specifier_description,
 					sizeof_specifier,
 					Lisp_Specifier);
+#endif /* not NEW_GC */
 
 /************************************************************************/
 /*                       Creating specifiers                            */