From b0b27ef99c9e48b9383f06a4128377b6a3bfeb70 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 31 Jan 2013 01:00:15 +0000 Subject: 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) --- GTMDefines.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'GTMDefines.h') 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. -- cgit v1.2.3