mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
Update Archiving of Structs
This commit is contained in:
parent
ece79a862c
commit
1fc9da8134
23 changed files with 5 additions and 4 deletions
|
@ -28,6 +28,7 @@
|
|||
*/
|
||||
|
||||
#import "common.h"
|
||||
#import "typeEncodingHelper.h"
|
||||
#import "Foundation/NSValue.h"
|
||||
#import "Foundation/NSCoder.h"
|
||||
#import "Foundation/NSDictionary.h"
|
||||
|
@ -411,28 +412,28 @@ static NSLock *placeholderLock;
|
|||
size = strlen(objctype)+1;
|
||||
[coder encodeValueOfObjCType: @encode(unsigned) at: &size];
|
||||
[coder encodeArrayOfObjCType: @encode(signed char) count: size at: objctype];
|
||||
if (strncmp("{_NSSize=", objctype, 9) == 0)
|
||||
if (strncmp(CGSIZE_ENCODING_PREFIX, objctype, strlen(CGSIZE_ENCODING_PREFIX)) == 0)
|
||||
{
|
||||
NSSize v = [self sizeValue];
|
||||
|
||||
[coder encodeValueOfObjCType: objctype at: &v];
|
||||
return;
|
||||
}
|
||||
else if (strncmp("{_NSPoint=", objctype, 10) == 0)
|
||||
else if (strncmp(CGPOINT_ENCODING_PREFIX, objctype, strlen(CGPOINT_ENCODING_PREFIX)) == 0)
|
||||
{
|
||||
NSPoint v = [self pointValue];
|
||||
|
||||
[coder encodeValueOfObjCType: objctype at: &v];
|
||||
return;
|
||||
}
|
||||
else if (strncmp("{_NSRect=", objctype, 9) == 0)
|
||||
else if (strncmp(CGRECT_ENCODING_PREFIX, objctype, strlen(CGRECT_ENCODING_PREFIX)) == 0)
|
||||
{
|
||||
NSRect v = [self rectValue];
|
||||
|
||||
[coder encodeValueOfObjCType: objctype at: &v];
|
||||
return;
|
||||
}
|
||||
else if (strncmp("{_NSRange=", objctype, 10) == 0)
|
||||
else if (strncmp(NSRANGE_ENCODING_PREFIX, objctype, strlen(NSRANGE_ENCODING_PREFIX)) == 0)
|
||||
{
|
||||
NSRange v = [self rangeValue];
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue