mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-29 16:01:38 +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
|
@ -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…
Add table
Add a link
Reference in a new issue