mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Corrections for archiver issues.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23203 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
299b25f471
commit
540989b765
3 changed files with 20 additions and 4 deletions
|
@ -1,3 +1,12 @@
|
|||
2006-08-04 23:26-EDT Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* Source/NSKeyedArchiver.m: in _encodeObject:forKey: use replacement
|
||||
if it exists.
|
||||
* Source/NSKeyedUnarchiver.m: in unarchiveObjectWithFile: remove
|
||||
autorelease pool, since the unarchiveObjectWithData: object is
|
||||
already autoreleased, this was causing a crash when unarchiving the
|
||||
object.
|
||||
|
||||
2006-07-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Additions/GSMime.m: Remove a couple of comments
|
||||
|
|
|
@ -205,6 +205,13 @@ static NSDictionary *makeReference(unsigned ref)
|
|||
}
|
||||
GSIMapAddPair(_repMap, (GSIMapKey)original, (GSIMapVal)anObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* If the object has a replacement, use it.
|
||||
*/
|
||||
anObject = node->value.obj;
|
||||
}
|
||||
}
|
||||
|
||||
if (anObject != nil)
|
||||
|
@ -237,7 +244,7 @@ static NSDictionary *makeReference(unsigned ref)
|
|||
{
|
||||
Class c = [anObject class];
|
||||
|
||||
// FIXME ... exactly what classes are stored directly???
|
||||
// FIXME ... exactly what classes are stored directly???
|
||||
if ([anObject isKindOfClass: [GSString class]] == YES
|
||||
|| c == [@"literal" class])
|
||||
{
|
||||
|
|
|
@ -320,14 +320,14 @@ static NSMapTable globalClassMap = 0;
|
|||
|
||||
+ (id) unarchiveObjectWithFile: (NSString*)aPath
|
||||
{
|
||||
CREATE_AUTORELEASE_POOL(pool);
|
||||
NSData *d;
|
||||
id o;
|
||||
|
||||
// CREATE_AUTORELEASE_POOL(pool);
|
||||
d = [NSData dataWithContentsOfFile: aPath];
|
||||
o = [self unarchiveObjectWithData: d];
|
||||
RETAIN(o);
|
||||
RELEASE(pool);
|
||||
// RETAIN(o);
|
||||
// RELEASE(pool);
|
||||
return AUTORELEASE(o);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue