]> granicus.if.org Git - gc/commitdiff
Suppress 'GC_dont_gc deprecated' warning in gc.h if GC_DONT_GC
authorIvan Maidanski <ivmai@mail.ru>
Sat, 8 Jun 2013 13:16:19 +0000 (17:16 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sat, 8 Jun 2013 13:16:19 +0000 (17:16 +0400)
* include/gc.h (GC_dont_gc): Do not specify GC_ATTR_DEPRECATED if
GC_DONT_GC defined (to avoid deprecated warning in
GC_INIT_CONF_MAX_RETRIES which assigns GC_dont_gc directly).

include/gc.h

index 5db4040b540df5dad99a621ae7d8a8646d0fb91d..a370deaeab78a2c429d63dd97bf16a300de9e7e8 100644 (file)
@@ -192,8 +192,11 @@ GC_API GC_ATTR_DEPRECATED GC_finalizer_notifier_proc GC_finalizer_notifier;
 GC_API void GC_CALL GC_set_finalizer_notifier(GC_finalizer_notifier_proc);
 GC_API GC_finalizer_notifier_proc GC_CALL GC_get_finalizer_notifier(void);
 
-GC_API GC_ATTR_DEPRECATED int GC_dont_gc;
-                        /* != 0 ==> Don't collect.  In versions 6.2a1+, */
+GC_API
+# ifndef GC_DONT_GC
+    GC_ATTR_DEPRECATED
+# endif
+  int GC_dont_gc;       /* != 0 ==> Don't collect.  In versions 6.2a1+, */
                         /* this overrides explicit GC_gcollect() calls. */
                         /* Used as a counter, so that nested enabling   */
                         /* and disabling work correctly.  Should        */