Internal storage fix.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@7553 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2000-09-19 22:36:30 +00:00
parent ef0f89c568
commit 8bde8b0bb1

View file

@ -73,7 +73,7 @@
GSTextInfo *info = (GSTextInfo*)NSAllocateObject(self, 0, z); GSTextInfo *info = (GSTextInfo*)NSAllocateObject(self, 0, z);
info->loc = l; info->loc = l;
info->attrs = [a copy]; info->attrs = [a copyWithZone: z];
return info; return info;
} }
@ -370,13 +370,14 @@ _attributesAtIndexEffectiveRange(
- (NSString*) string - (NSString*) string
{ {
return textChars; return AUTORELEASE([textChars copyWithZone: NSDefaultMallocZone()]);
} }
- (NSDictionary*) attributesAtIndex: (unsigned)index - (NSDictionary*) attributesAtIndex: (unsigned)index
effectiveRange: (NSRange*)aRange effectiveRange: (NSRange*)aRange
{ {
unsigned dummy; unsigned dummy;
return _attributesAtIndexEffectiveRange( return _attributesAtIndexEffectiveRange(
index, aRange, [textChars length], infoArray, &dummy); index, aRange, [textChars length], infoArray, &dummy);
} }