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:
Gregory John Casamento 2006-08-05 03:28:57 +00:00
parent 299b25f471
commit 540989b765
3 changed files with 20 additions and 4 deletions

View file

@ -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])
{

View file

@ -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);
}