aboutsummaryrefslogtreecommitdiff
path: root/GTMDefines.h
diff options
context:
space:
mode:
authorGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-01-31 01:00:15 +0000
committerGravatar gtm.daemon <gtm.daemon@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2013-01-31 01:00:15 +0000
commitb0b27ef99c9e48b9383f06a4128377b6a3bfeb70 (patch)
treec315a63db1a7f3ec3403cc75e5e60b0dcfe5f838 /GTMDefines.h
parentef9d9b9e7e0e44b7505d91c7c62561efdc24a43c (diff)
Fix GTM_NONNULL macro to properly support multiple non-null parameters, like __attribute__((nonnull(1,2,3)))
DELTA=5 (4 added, 0 deleted, 1 changed)
Diffstat (limited to 'GTMDefines.h')
-rw-r--r--GTMDefines.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/GTMDefines.h b/GTMDefines.h
index c615d9f..5a41e6e 100644
--- a/GTMDefines.h
+++ b/GTMDefines.h
@@ -341,7 +341,11 @@
#endif
#ifndef GTM_NONNULL
- #define GTM_NONNULL(x) __attribute__((nonnull(x)))
+ #if __has_attribute(nonnull)
+ #define GTM_NONNULL(x) __attribute__((nonnull x))
+ #else
+ #define GTM_NONNULL(x)
+ #endif
#endif
// Invalidates the initializer from which it's called.