Mercurial > hg > xemacs-beta
diff src/opaque.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 | 1e7cc382eb16 |
children | 6ef8256a020a e0db3c197671 |
line wrap: on
line diff
--- a/src/opaque.c Sun Feb 26 22:51:04 2006 +0000 +++ b/src/opaque.c Mon Feb 27 16:29:29 2006 +0000 @@ -38,9 +38,9 @@ #include "lisp.h" #include "opaque.h" -#ifndef MC_ALLOC +#ifndef NEW_GC Lisp_Object Vopaque_ptr_free_list; -#endif /* not MC_ALLOC */ +#endif /* not NEW_GC */ /* Should never, ever be called. (except by an external debugger) */ static void @@ -162,13 +162,13 @@ Lisp_Object make_opaque_ptr (void *val) { -#ifdef MC_ALLOC +#ifdef NEW_GC Lisp_Object res = wrap_pointer_1 (alloc_lrecord_type (Lisp_Opaque_Ptr, &lrecord_opaque_ptr)); -#else /* not MC_ALLOC */ +#else /* not NEW_GC */ Lisp_Object res = alloc_managed_lcrecord (Vopaque_ptr_free_list); -#endif /* not MC_ALLOC */ +#endif /* not NEW_GC */ set_opaque_ptr (res, val); return res; } @@ -179,14 +179,14 @@ void free_opaque_ptr (Lisp_Object ptr) { -#ifdef MC_ALLOC +#ifdef NEW_GC free_lrecord (ptr); -#else /* not MC_ALLOC */ +#else /* not NEW_GC */ free_managed_lcrecord (Vopaque_ptr_free_list, ptr); -#endif /* not MC_ALLOC */ +#endif /* not NEW_GC */ } -#ifndef MC_ALLOC +#ifndef NEW_GC void reinit_opaque_early (void) { @@ -194,7 +194,7 @@ &lrecord_opaque_ptr); staticpro_nodump (&Vopaque_ptr_free_list); } -#endif /* not MC_ALLOC */ +#endif /* not NEW_GC */ void init_opaque_once_early (void) @@ -202,7 +202,7 @@ INIT_LRECORD_IMPLEMENTATION (opaque); INIT_LRECORD_IMPLEMENTATION (opaque_ptr); -#ifndef MC_ALLOC +#ifndef NEW_GC reinit_opaque_early (); -#endif /* not MC_ALLOC */ +#endif /* not NEW_GC */ }