mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
compatibility fix for macos-x
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@19514 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c2c10187fe
commit
d1daf27fd2
2 changed files with 32 additions and 30 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-06-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSDictionary.m: MacOS-X compatibility fix for keyed encoding
|
||||
of empty dictionary.
|
||||
|
||||
2004-06-10 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Version 1.9.2
|
||||
|
|
|
@ -182,16 +182,13 @@ static SEL appSel;
|
|||
|
||||
if ([aCoder allowsKeyedCoding])
|
||||
{
|
||||
if (count > 0)
|
||||
{
|
||||
NSEnumerator *enumerator = [self keyEnumerator];
|
||||
id key;
|
||||
unsigned i;
|
||||
|
||||
if ([aCoder class] == [NSKeyedArchiver class])
|
||||
{
|
||||
NSArray *keys = [self allKeys];
|
||||
id objects = [NSMutableArray arrayWithCapacity: count];
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
|
@ -203,10 +200,11 @@ static SEL appSel;
|
|||
[(NSKeyedArchiver*)aCoder _encodeArrayOfObjects: objects
|
||||
forKey: @"NS.objects"];
|
||||
}
|
||||
else
|
||||
else if (count > 0)
|
||||
{
|
||||
unsigned i = 0;
|
||||
NSEnumerator *enumerator = [self keyEnumerator];
|
||||
|
||||
i = 0;
|
||||
while ((key = [enumerator nextObject]) != nil)
|
||||
{
|
||||
NSString *s;
|
||||
|
@ -219,7 +217,6 @@ static SEL appSel;
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
[aCoder encodeValueOfObjCType: @encode(unsigned) at: &count];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue