mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Fix mistake
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@12808 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9af8e434bd
commit
52df8bfe7c
2 changed files with 8 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
2002-02-27 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Tools/gdomap.c: Removed obsolete code for shrinking data structures.
|
||||
* Source/GSValue.m: attempt to correct encoding.
|
||||
|
||||
2002-02-26 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
|
|
|
@ -241,20 +241,22 @@ typeSize(const char* type)
|
|||
return [NSString stringWithFormat: @"(%s) %@", objctype, [rep description]];
|
||||
}
|
||||
|
||||
// NSCoding
|
||||
- (void) encodeWithCoder: (NSCoder *)coder
|
||||
{
|
||||
NSMutableData *d;
|
||||
unsigned size;
|
||||
NSMutableData *d;
|
||||
|
||||
size = strlen(objctype)+1;
|
||||
[coder encodeValueOfObjCType: @encode(unsigned) at: &size];
|
||||
[coder encodeArrayOfObjCType: @encode(signed char) count: size at: objctype];
|
||||
|
||||
size = objc_sizeof_type(objctype);
|
||||
d = [NSMutableData new];
|
||||
[d serializeDataAt: data ofObjCType: objctype context: nil];
|
||||
[coder encodeValueOfObjCType: @encode(id) at: &d];
|
||||
size = [d length];
|
||||
[coder encodeValueOfObjCType: @encode(unsigned) at: &size];
|
||||
[coder encodeArrayOfObjCType: @encode(unsigned char)
|
||||
count: size
|
||||
at: [d bytes]];
|
||||
RELEASE(d);
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue