mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Don't call [NSZombie+class] as the method doesn't exist.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@32105 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d060289f36
commit
f7e7ef50c3
2 changed files with 18 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
|||
2011-02-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSZombie.m: Get zombie class to set up class pointer in
|
||||
+initialize rather than using +class since +class is not implemented
|
||||
and David says support for it is runtime specific.
|
||||
|
||||
2011-02-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSPortCoder.m:
|
||||
|
|
|
@ -105,6 +105,7 @@ static Class NSConstantStringClass;
|
|||
{
|
||||
Class isa;
|
||||
}
|
||||
+ (void) initialize;
|
||||
- (Class) class;
|
||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector;
|
||||
|
@ -127,20 +128,14 @@ BOOL NSZombieEnabled = NO;
|
|||
BOOL NSDeallocateZombies = NO;
|
||||
|
||||
@class NSZombie;
|
||||
static Class zombieClass = Nil;
|
||||
static NSMapTable *zombieMap = 0;
|
||||
|
||||
#if !GS_WITH_GC
|
||||
static void GSMakeZombie(NSObject *o)
|
||||
{
|
||||
static Class zombieClass = Nil;
|
||||
Class c;
|
||||
|
||||
if (nil == zombieClass)
|
||||
{
|
||||
zombieMap = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks,
|
||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||
zombieClass = [NSZombie class];
|
||||
}
|
||||
c = object_getClass(o);
|
||||
object_setClass(o, zombieClass);
|
||||
if (NSDeallocateZombies == NO)
|
||||
|
@ -967,6 +962,7 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
|||
// Zombie management flags.
|
||||
NSZombieEnabled = GSPrivateEnvironmentFlag("NSZombieEnabled", NO);
|
||||
NSDeallocateZombies = GSPrivateEnvironmentFlag("NSDeallocateZombies", NO);
|
||||
[NSZombie initialize];
|
||||
|
||||
// Set up the autorelease system
|
||||
autorelease_class = [NSAutoreleasePool class];
|
||||
|
@ -2254,6 +2250,15 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
|||
|
||||
|
||||
@implementation NSZombie
|
||||
+ (void) initialize
|
||||
{
|
||||
if (nil == zombieClass)
|
||||
{
|
||||
zombieMap = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks,
|
||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||
zombieClass = [NSZombie class];
|
||||
}
|
||||
}
|
||||
- (Class) class
|
||||
{
|
||||
return (Class)isa;
|
||||
|
|
Loading…
Reference in a new issue