From 3d7865c21b3225ddb4e0059ffdccbc6281e5ca55 Mon Sep 17 00:00:00 2001 From: wlux Date: Sun, 10 Jul 2011 14:48:26 +0000 Subject: [PATCH] Override NSObject +zone to ensure that -zone returns a valid zone pointer when it is called on a class object. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33498 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSObject.m | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4bc2ab916..b6ffaf2c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-07-10 Wolfgang Lux + + * Source/NSObject.m (+zone): Override to ensure that -zone returns + a valid zone pointer when it is called on a class object. + 2011-07-05 Fred Kiefer * macosx/gnustep.pbproj/project.pbxproj, diff --git a/Source/NSObject.m b/Source/NSObject.m index 09d3c533e..1a8c8d90f 100644 --- a/Source/NSObject.m +++ b/Source/NSObject.m @@ -2164,6 +2164,13 @@ static id gs_weak_load(id obj) #endif } +#if !GS_WITH_GC && !__OBJC_GC__ ++ (NSZone *) zone +{ + return NSDefaultMallocZone(); +} +#endif + /** * Called to encode the instance variables of the receiver to aCoder.
* Subclasses should call the superclass method at the start of their