From 12745b6fdea3255688e5b2b27de97a445cdeaef9 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Wed, 27 Jul 2011 18:03:22 +0000 Subject: [PATCH] Don't export functions that use id if we're not in Objective-C mode. I'm not entirely sure what this gs_consume stuff does, since it's not documented, but it looks a lot like it might be nonsense - it's almost certainly broken in ARC mode, where this static inline function will be emitted as objc_release() and will free the object. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33652 72102866-910b-0410-8b05-ffd578937521 --- Headers/GNUstepBase/GSVersionMacros.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Headers/GNUstepBase/GSVersionMacros.h b/Headers/GNUstepBase/GSVersionMacros.h index 66ec5c796..16d37e031 100644 --- a/Headers/GNUstepBase/GSVersionMacros.h +++ b/Headers/GNUstepBase/GSVersionMacros.h @@ -268,7 +268,7 @@ # endif #endif -#ifdef __clang__ +#if defined(__clang__) && defined(__OBJC__) static inline void gs_consumed(id NS_CONSUMED o) __attribute__ ((unused)); static inline void gs_consumed(id NS_CONSUMED o) { return; } #define GS_CONSUMED(O) gs_consumed(O);