mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix #20268
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@25292 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c12455b7ea
commit
7c07115c17
3 changed files with 50 additions and 0 deletions
|
@ -1,3 +1,9 @@
|
|||
2007-06-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSKeyedArchiver.m:
|
||||
* Source/NSKeyedUnarchiver.m:
|
||||
Implement support for arrays of objc types to fix bug #20268
|
||||
|
||||
2007-06-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
Rewrite code to support parsing of predicates containing
|
||||
|
|
|
@ -741,6 +741,18 @@ static NSDictionary *makeReference(unsigned ref)
|
|||
NSStringFromClass([self class]), NSStringFromSelector(_cmd)];
|
||||
return;
|
||||
|
||||
case _C_ARY_B:
|
||||
{
|
||||
int count = atoi(++type);
|
||||
|
||||
while (isdigit(*type))
|
||||
{
|
||||
type++;
|
||||
}
|
||||
[self encodeArrayOfObjCType: type count: count at: address];
|
||||
}
|
||||
return;
|
||||
|
||||
default: /* Types that can be ignored in first pass. */
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"-[%@ %@]: unknown type encoding ('%c')",
|
||||
|
@ -770,6 +782,16 @@ static NSDictionary *makeReference(unsigned ref)
|
|||
[_delegate archiverDidFinish: self];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
Class c = [self class];
|
||||
RELEASE(self);
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"-[%@ init]: cannot use -init for initialisation",
|
||||
NSStringFromClass(c)];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) initForWritingWithMutableData: (NSMutableData*)data
|
||||
{
|
||||
self = [super init];
|
||||
|
|
|
@ -715,6 +715,18 @@ static NSMapTable globalClassMap = 0;
|
|||
NSStringFromClass([self class]), NSStringFromSelector(_cmd)];
|
||||
return;
|
||||
|
||||
case _C_ARY_B:
|
||||
{
|
||||
int count = atoi(++type);
|
||||
|
||||
while (isdigit(*type))
|
||||
{
|
||||
type++;
|
||||
}
|
||||
[self decodeArrayOfObjCType: type count: count at: address];
|
||||
}
|
||||
return;
|
||||
|
||||
default:
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"-[%@ %@]: unknown type encoding ('%c')",
|
||||
|
@ -735,6 +747,16 @@ static NSMapTable globalClassMap = 0;
|
|||
[_delegate unarchiverDidFinish: self];
|
||||
}
|
||||
|
||||
- (id) init
|
||||
{
|
||||
Class c = [self class];
|
||||
RELEASE(self);
|
||||
[NSException raise: NSInvalidArgumentException
|
||||
format: @"-[%@ init]: cannot use -init for initialisation",
|
||||
NSStringFromClass(c)];
|
||||
return nil;
|
||||
}
|
||||
|
||||
- (id) initForReadingWithData: (NSData*)data
|
||||
{
|
||||
self = [super init];
|
||||
|
|
Loading…
Reference in a new issue