mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
* Tests/base/NSArchiver/stringEncoding.m: Use PASS_EQUAL instead
of PASS. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36617 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d1c37454fd
commit
22cc232988
4 changed files with 35 additions and 4 deletions
|
@ -139,6 +139,31 @@ static NSMapTable *globalClassMap = 0;
|
|||
|
||||
return o;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method is used to replace oldObj with newObj
|
||||
* in the map that is maintained in NSKeyedUnarchiver.
|
||||
*/
|
||||
- (BOOL) replaceObject: (id)oldObj withObject: (id)newObj
|
||||
{
|
||||
unsigned int i = 0;
|
||||
unsigned int count = GSIArrayCount(_objMap);
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
id obj = GSIArrayItemAtIndex(_objMap, i).obj;
|
||||
if (obj == oldObj)
|
||||
break;
|
||||
}
|
||||
|
||||
if (i < count)
|
||||
{
|
||||
GSIArraySetItemAtIndex(_objMap, (GSIArrayItem)newObj, i);
|
||||
return YES;
|
||||
}
|
||||
|
||||
return NO;
|
||||
}
|
||||
@end
|
||||
|
||||
@implementation NSKeyedUnarchiver (Private)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue