From: ivmai Date: Sat, 17 Oct 2009 21:00:46 +0000 (+0000) Subject: 2009-10-17 Ivan Maidanski X-Git-Tag: gc7_2alpha4~42 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5ae49b3abfff5e9cbf16cf5393604bc72cba5256;p=gc 2009-10-17 Ivan Maidanski * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h inclusion. * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is not included yet. * finalize.c (I_HIDE_POINTERS): Don't define. * include/private/dbg_mlc.h (I_HIDE_POINTERS): Ditto. * misc.c (I_HIDE_POINTERS): Ditto. * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER, GC_hidden_pointer): Don't define if HIDE_POINTER is undefined. * include/private/gc_pmark.h: Remove the comment about gc_priv.h inclusion order. --- diff --git a/ChangeLog b/ChangeLog index d0207071..f659251a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2009-10-17 Ivan Maidanski + + * include/private/gc_priv.h (I_HIDE_POINTERS): Define before gc.h + inclusion. + * include/private/gc_pmark.h (I_HIDE_POINTERS): Define if gc.h is + not included yet. + * finalize.c (I_HIDE_POINTERS): Don't define. + * include/private/dbg_mlc.h (I_HIDE_POINTERS): Ditto. + * misc.c (I_HIDE_POINTERS): Ditto. + * include/private/dbg_mlc.h (HIDE_POINTER, REVEAL_POINTER, + GC_hidden_pointer): Don't define if HIDE_POINTER is undefined. + * include/private/gc_pmark.h: Remove the comment about gc_priv.h + inclusion order. + 2009-10-17 Ivan Maidanski * dyn_load.c: Include gc_priv.h before using configuration diff --git a/finalize.c b/finalize.c index aca3709d..ceedad1c 100644 --- a/finalize.c +++ b/finalize.c @@ -14,8 +14,8 @@ * modified is included with the above copyright notice. */ /* Boehm, February 1, 1996 1:19 pm PST */ -# define I_HIDE_POINTERS -# include "private/gc_pmark.h" + +#include "private/gc_pmark.h" # ifdef FINALIZE_ON_DEMAND int GC_finalize_on_demand = 1; diff --git a/include/private/dbg_mlc.h b/include/private/dbg_mlc.h index aa652ded..684ec3f6 100644 --- a/include/private/dbg_mlc.h +++ b/include/private/dbg_mlc.h @@ -23,24 +23,13 @@ */ #ifndef _DBG_MLC_H - #define _DBG_MLC_H -# define I_HIDE_POINTERS # include "gc_priv.h" # ifdef KEEP_BACK_PTRS # include "gc_backptr.h" # endif -#ifndef HIDE_POINTER - /* Gc.h was previously included, and hence the I_HIDE_POINTERS */ - /* definition had no effect. Repeat the gc.h definitions here to */ - /* get them anyway. */ - typedef GC_word GC_hidden_pointer; -# define HIDE_POINTER(p) (~(GC_hidden_pointer)(p)) -# define REVEAL_POINTER(p) ((void *)(HIDE_POINTER(p))) -#endif /* HIDE_POINTER */ - # define START_FLAG ((word)0xfedcedcb) # define END_FLAG ((word)0xbcdecdef) /* Stored both one past the end of user object, and one before */ diff --git a/include/private/gc_pmark.h b/include/private/gc_pmark.h index 31b5340f..bad456b4 100644 --- a/include/private/gc_pmark.h +++ b/include/private/gc_pmark.h @@ -18,9 +18,6 @@ /* * Declarations of mark stack. Needed by marker and client supplied mark * routines. Transitively include gc_priv.h. - * (Note that gc_priv.h should not be included before this, since this - * includes dbg_mlc.h, which wants to include gc_priv.h AFTER defining - * I_HIDE_POINTERS.) */ #ifndef GC_PMARK_H # define GC_PMARK_H @@ -37,6 +34,9 @@ # include "dbg_mlc.h" # endif # ifndef GC_MARK_H +# ifndef _GC_H +# define I_HIDE_POINTERS /* to get HIDE_POINTER() and friends */ +# endif # include "../gc_mark.h" # endif # ifndef GC_PRIVATE_H diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h index 02bc3594..0ea0cd19 100644 --- a/include/private/gc_priv.h +++ b/include/private/gc_priv.h @@ -52,6 +52,7 @@ #endif #ifndef _GC_H +# define I_HIDE_POINTERS /* to get HIDE_POINTER() and friends */ # include "../gc.h" #endif diff --git a/misc.c b/misc.c index 35e61a28..d7bb80db 100644 --- a/misc.c +++ b/misc.c @@ -14,12 +14,10 @@ */ /* Boehm, July 31, 1995 5:02 pm PDT */ - #include #include #include -#define I_HIDE_POINTERS /* To make GC_call_with_alloc_lock visible */ #include "private/gc_pmark.h" #ifndef MSWINCE