More ARC fixes. We don't want to be using __strong void* in ARC mode (it only makes sense in GC mode and is invalid in ARC mode).

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33411 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
David Chisnall 2011-06-29 15:21:02 +00:00
parent faa2c2a63f
commit 276046a76c
4 changed files with 14 additions and 4 deletions

View file

@ -65,7 +65,7 @@ extern "C" {
{
#if GS_EXPOSE(NSNotificationCenter)
@private
__strong void *_table;
GS_GC_STRONG void *_table;
#endif
}

View file

@ -28,7 +28,8 @@
#ifndef __NSZone_h_GNUSTEP_BASE_INCLUDE
#define __NSZone_h_GNUSTEP_BASE_INCLUDE
#import <GNUstepBase/GSVersionMacros.h>
#import "GNUstepBase/GSVersionMacros.h"
#import "GNUstepBase/preface.h"
/**
* Primary structure representing an <code>NSZone</code>. Technically it
@ -308,14 +309,14 @@ enum {
* garbage collected itsself.<br />
* In any case the memory returned is zero'ed.
*/
GS_EXPORT __strong void *
GS_EXPORT GS_GC_STRONG void *
NSAllocateCollectable(NSUInteger size, NSUInteger options);
/** Reallocate memory to be of a different size and/or to have different
* options settings. The behavior of options is as for
* the NSAllocateCollectable() function.
*/
GS_EXPORT __strong void *
GS_EXPORT GS_GC_STRONG void *
NSReallocateCollectable(void *ptr, NSUInteger size, NSUInteger options);
#endif

View file

@ -239,6 +239,14 @@
#include <stdint.h>
#endif
// Strong has different semantics in GC and ARC modes, so we need to have a
// macro that picks the correct one.
#if __OBJC_GC__
# define GS_GC_STRONG __strong
#else
# define GS_GC_STRONG
#endif
#if !__has_feature(objc_arc)
# if __OBJC_GC__
# define __strong __attribute__((objc_gc(strong)))

View file

@ -19,6 +19,7 @@
*/
#import "GNUstepBase/preface.h"
#import "common.h"
#import "Foundation/NSString.h"
#import "Foundation/NSAutoreleasePool.h"