]> granicus.if.org Git - gc/commitdiff
2011-05-10 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Tue, 10 May 2011 11:07:12 +0000 (11:07 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:58 +0000 (21:06 +0400)
* include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
unconditionally (do not test GC_I_HIDE_POINTERS); update the
comment.
* include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
GC_HIDE/REVEAL_POINTER, respectively.
* include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
* include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto.

ChangeLog
include/gc.h
include/private/gc_pmark.h
include/private/gc_priv.h

index 49036fd564d7d8fc35bd0c4893e3e886257ca417..e2108958e08fabeaa51deb714c952886a7da32b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2011-05-10  Ivan Maidanski  <ivmai@mail.ru>
+
+       * include/gc.h (GC_HIDE_POINTER, GC_REVEAL_POINTER): Define
+       unconditionally (do not test GC_I_HIDE_POINTERS); update the
+       comment.
+       * include/gc.h (HIDE_POINTER, REVEAL_POINTER): Define as alias to
+       GC_HIDE/REVEAL_POINTER, respectively.
+       * include/private/gc_pmark.h (GC_I_HIDE_POINTERS): Do not define.
+       * include/private/gc_priv.h (GC_I_HIDE_POINTERS): Ditto.
+
 2011-05-10  Ivan Maidanski  <ivmai@mail.ru>
 
        * include/gc.h (GC_register_my_thread): Refine the comment.
index ae80fd95bda748f1493af3f3aaa67c98c0101355..e94a943e62e3e91b7961b0f88d0ea8e6d78c084b 100644 (file)
@@ -958,20 +958,18 @@ GC_API void GC_CALLBACK GC_ignore_warn_proc(char *, GC_word);
 /* Note that putting pointers in atomic objects or in           */
 /* non-pointer slots of "typed" objects is equivalent to        */
 /* disguising them in this way, and may have other advantages.  */
-#if defined(I_HIDE_POINTERS) || defined(GC_I_HIDE_POINTERS)
-  typedef GC_word GC_hidden_pointer;
-# define HIDE_POINTER(p) (~(GC_hidden_pointer)(p))
-# define REVEAL_POINTER(p) ((void *)HIDE_POINTER(p))
-  /* Converting a hidden pointer to a real pointer requires verifying   */
-  /* that the object still exists.  This involves acquiring the         */
-  /* allocator lock to avoid a race with the collector.                 */
-#endif /* I_HIDE_POINTERS */
-
-/* The GC-prefixed symbols are preferred for new code (I_HIDE_POINTERS, */
-/* HIDE_POINTER and REVEAL_POINTER remain for compatibility).           */
-#ifdef GC_I_HIDE_POINTERS
-# define GC_HIDE_POINTER(p) HIDE_POINTER(p)
-# define GC_REVEAL_POINTER(p) REVEAL_POINTER(p)
+typedef GC_word GC_hidden_pointer;
+#define GC_HIDE_POINTER(p) (~(GC_hidden_pointer)(p))
+/* Converting a hidden pointer to a real pointer requires verifying     */
+/* that the object still exists.  This involves acquiring the           */
+/* allocator lock to avoid a race with the collector.                   */
+#define GC_REVEAL_POINTER(p) ((void *)GC_HIDE_POINTER(p))
+
+#ifdef I_HIDE_POINTERS
+  /* This exists only for compatibility (the GC-prefixed symbols are    */
+  /* preferred for new code).                                           */
+# define HIDE_POINTER(p) GC_HIDE_POINTER(p)
+# define REVEAL_POINTER(p) GC_REVEAL_POINTER(p)
 #endif
 
 typedef void * (GC_CALLBACK * GC_fn_type)(void * /* client_data */);
index d99e0b7f6dfa75ae8084b56e450cfcb4428f68c7..3064050554ab5b090c84ba4763e56632453b54a5 100644 (file)
@@ -35,9 +35,6 @@
 #endif
 
 #ifndef GC_MARK_H
-# ifndef GC_H
-#   define GC_I_HIDE_POINTERS /* to get GC_HIDE_POINTER() and friends */
-# endif
 # include "../gc_mark.h"
 #endif
 
index c02def1b29c5325c9732c7bba511f1ac0f107983..84d40f546cdd69f79e9042cdda1940929a10ba4c 100644 (file)
@@ -43,7 +43,6 @@
 # endif
 
 #ifndef GC_H
-# define GC_I_HIDE_POINTERS /* to get GC_HIDE_POINTER() and friends */
 # include "../gc.h"
 #endif