make better guess at which objects should be archived directly.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23289 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-08-14 07:16:26 +00:00
parent d8c3245e73
commit 43a7c30c73
2 changed files with 13 additions and 4 deletions

View file

@ -242,13 +242,15 @@ static NSDictionary *makeReference(unsigned ref)
}
else
{
Class c = [anObject class];
Class c = [anObject classForKeyedArchiver];
// FIXME ... exactly what classes are stored directly???
if ([anObject isKindOfClass: [GSString class]] == YES
|| c == [@"literal" class])
if (c == [NSString class]
|| c == [NSNumber class]
|| c == [NSDate class]
|| c == [NSData class]
)
{
// We will store the string object directly.
objectInfo = anObject;
}
else