mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
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:
parent
d8c3245e73
commit
43a7c30c73
2 changed files with 13 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
|||
2006-08-14 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSKeyedArchiver.m: make a guess at how MacOS-X decides to
|
||||
encode objects directly ... if the classForKeyedArchiver method
|
||||
returns a property list class (other then array and dictionary
|
||||
which contain other objects) we try direct coding.
|
||||
|
||||
2006-08-13 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/GSFormat.m: optimise a bit and fix bug where utf8 (and other
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue