mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Cope nicely with nil property-lists
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3494 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b6e52cf48a
commit
e44ff32bbe
2 changed files with 12 additions and 6 deletions
|
@ -16,6 +16,7 @@ Fri Dec 18 18:15:00 1998 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
|||
NSGString.m: ditto
|
||||
NSString.m: ditto
|
||||
NSConcreteNumber.m: Added ([-replacementObjectForPortCoder:])
|
||||
NSCoder.m: Cope nicely with encode/decode of nil property-list.
|
||||
|
||||
Thu Dec 17 16:12:18 1998 Matthias Klose <doko@cs.tu-berlin.de>
|
||||
|
||||
|
|
|
@ -117,8 +117,8 @@
|
|||
|
||||
- (void) encodePropertyList: (id)plist
|
||||
{
|
||||
id anObject = [NSSerializer serializePropertyList: plist];
|
||||
[self encodeValueOfObjCType:@encode(id) at: &anObject];
|
||||
id anObject = plist ? [NSSerializer serializePropertyList: plist] : nil;
|
||||
[self encodeValueOfObjCType: @encode(id) at: &anObject];
|
||||
}
|
||||
|
||||
- (void) encodePoint: (NSPoint)point
|
||||
|
@ -200,10 +200,15 @@
|
|||
{
|
||||
id o;
|
||||
id d;
|
||||
[self decodeValueOfObjCType:@encode(id) at:&d];
|
||||
o = [NSDeserializer deserializePropertyListFromData: d
|
||||
mutableContainers: NO];
|
||||
[d release];
|
||||
[self decodeValueOfObjCType: @encode(id) at: &d];
|
||||
if (d)
|
||||
{
|
||||
o = [NSDeserializer deserializePropertyListFromData: d
|
||||
mutableContainers: NO];
|
||||
[d release];
|
||||
}
|
||||
else
|
||||
o = nil;
|
||||
return o;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue