mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +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
d1dc69d743
commit
efbbe74e26
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>
|
2011-02-12 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* Source/NSPortCoder.m:
|
* Source/NSPortCoder.m:
|
||||||
|
|
|
@ -105,6 +105,7 @@ static Class NSConstantStringClass;
|
||||||
{
|
{
|
||||||
Class isa;
|
Class isa;
|
||||||
}
|
}
|
||||||
|
+ (void) initialize;
|
||||||
- (Class) class;
|
- (Class) class;
|
||||||
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
- (void) forwardInvocation: (NSInvocation*)anInvocation;
|
||||||
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector;
|
- (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector;
|
||||||
|
@ -127,20 +128,14 @@ BOOL NSZombieEnabled = NO;
|
||||||
BOOL NSDeallocateZombies = NO;
|
BOOL NSDeallocateZombies = NO;
|
||||||
|
|
||||||
@class NSZombie;
|
@class NSZombie;
|
||||||
|
static Class zombieClass = Nil;
|
||||||
static NSMapTable *zombieMap = 0;
|
static NSMapTable *zombieMap = 0;
|
||||||
|
|
||||||
#if !GS_WITH_GC
|
#if !GS_WITH_GC
|
||||||
static void GSMakeZombie(NSObject *o)
|
static void GSMakeZombie(NSObject *o)
|
||||||
{
|
{
|
||||||
static Class zombieClass = Nil;
|
|
||||||
Class c;
|
Class c;
|
||||||
|
|
||||||
if (nil == zombieClass)
|
|
||||||
{
|
|
||||||
zombieMap = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks,
|
|
||||||
NSNonOwnedPointerMapValueCallBacks, 0);
|
|
||||||
zombieClass = [NSZombie class];
|
|
||||||
}
|
|
||||||
c = object_getClass(o);
|
c = object_getClass(o);
|
||||||
object_setClass(o, zombieClass);
|
object_setClass(o, zombieClass);
|
||||||
if (NSDeallocateZombies == NO)
|
if (NSDeallocateZombies == NO)
|
||||||
|
@ -967,6 +962,7 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
||||||
// Zombie management flags.
|
// Zombie management flags.
|
||||||
NSZombieEnabled = GSPrivateEnvironmentFlag("NSZombieEnabled", NO);
|
NSZombieEnabled = GSPrivateEnvironmentFlag("NSZombieEnabled", NO);
|
||||||
NSDeallocateZombies = GSPrivateEnvironmentFlag("NSDeallocateZombies", NO);
|
NSDeallocateZombies = GSPrivateEnvironmentFlag("NSDeallocateZombies", NO);
|
||||||
|
[NSZombie initialize];
|
||||||
|
|
||||||
// Set up the autorelease system
|
// Set up the autorelease system
|
||||||
autorelease_class = [NSAutoreleasePool class];
|
autorelease_class = [NSAutoreleasePool class];
|
||||||
|
@ -2254,6 +2250,15 @@ objc_create_block_classes_as_subclasses_of(Class super) __attribute__((weak));
|
||||||
|
|
||||||
|
|
||||||
@implementation NSZombie
|
@implementation NSZombie
|
||||||
|
+ (void) initialize
|
||||||
|
{
|
||||||
|
if (nil == zombieClass)
|
||||||
|
{
|
||||||
|
zombieMap = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks,
|
||||||
|
NSNonOwnedPointerMapValueCallBacks, 0);
|
||||||
|
zombieClass = [NSZombie class];
|
||||||
|
}
|
||||||
|
}
|
||||||
- (Class) class
|
- (Class) class
|
||||||
{
|
{
|
||||||
return (Class)isa;
|
return (Class)isa;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue