mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Minor bugfix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4586 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
6710be255a
commit
b1eec7c6f3
2 changed files with 12 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
Wed Jul 14 16:58:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSAttributedString.m: Fixed ([allocWithZone:]) so that
|
||||
subclasses should work correctly.
|
||||
|
||||
Wed Jul 14 10:32:17 1999 Adam Fedor <fedor@ultra.doc.com>
|
||||
|
||||
* Testing/Makefile.preamble: Fix include path the headers.
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
|
||||
@implementation NSAttributedString
|
||||
|
||||
static Class NSAttributedString_abstract_class;
|
||||
static Class NSAttributedString_concrete_class;
|
||||
static Class NSMutableAttributedString_concrete_class;
|
||||
|
||||
|
@ -93,8 +94,8 @@ static Class NSMutableAttributedString_concrete_class;
|
|||
{
|
||||
if (self == [NSAttributedString class])
|
||||
{
|
||||
NSAttributedString_concrete_class
|
||||
= [NSGAttributedString class];
|
||||
NSAttributedString_abstract_class = self;
|
||||
NSAttributedString_concrete_class = [NSGAttributedString class];
|
||||
NSMutableAttributedString_concrete_class
|
||||
= [NSGMutableAttributedString class];
|
||||
}
|
||||
|
@ -102,7 +103,10 @@ static Class NSMutableAttributedString_concrete_class;
|
|||
|
||||
+ (id) allocWithZone: (NSZone*)z
|
||||
{
|
||||
return NSAllocateObject([self _concreteClass], 0, z);
|
||||
if (self == NSAttributedString_abstract_class)
|
||||
return NSAllocateObject([self _concreteClass], 0, z);
|
||||
else
|
||||
return NSAllocateObject(self, 0, z);
|
||||
}
|
||||
|
||||
//NSCoding protocol
|
||||
|
|
Loading…
Reference in a new issue