mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Do not ignore struct name when comparing type encoding as NSPoint and NSSize have the same layout
This commit is contained in:
parent
64a37ff8e5
commit
1a26f6436a
1 changed files with 4 additions and 4 deletions
|
@ -1317,7 +1317,7 @@ GSObjCGetVal(NSObject *self, const char *key, SEL sel,
|
|||
break;
|
||||
|
||||
case _C_STRUCT_B:
|
||||
if (GSSelectorTypesMatch(@encode(NSPoint), type))
|
||||
if (strncmp(@encode(NSPoint), type, strlen(@encode(NSPoint))) == 0)
|
||||
{
|
||||
NSPoint v;
|
||||
|
||||
|
@ -1334,7 +1334,7 @@ GSObjCGetVal(NSObject *self, const char *key, SEL sel,
|
|||
}
|
||||
val = [NSValue valueWithPoint: v];
|
||||
}
|
||||
else if (GSSelectorTypesMatch(@encode(NSRange), type))
|
||||
else if (strncmp(@encode(NSRange), type, strlen(@encode(NSRange))) == 0)
|
||||
{
|
||||
NSRange v;
|
||||
|
||||
|
@ -1351,7 +1351,7 @@ GSObjCGetVal(NSObject *self, const char *key, SEL sel,
|
|||
}
|
||||
val = [NSValue valueWithRange: v];
|
||||
}
|
||||
else if (GSSelectorTypesMatch(@encode(NSRect), type))
|
||||
else if (strncmp(@encode(NSRect), type, strlen(@encode(NSRect))) == 0)
|
||||
{
|
||||
NSRect v;
|
||||
|
||||
|
@ -1368,7 +1368,7 @@ GSObjCGetVal(NSObject *self, const char *key, SEL sel,
|
|||
}
|
||||
val = [NSValue valueWithRect: v];
|
||||
}
|
||||
else if (GSSelectorTypesMatch(@encode(NSSize), type))
|
||||
else if (strncmp(@encode(NSSize), type, strlen(@encode(NSSize))) == 0)
|
||||
{
|
||||
NSSize v;
|
||||
|
||||
|
|
Loading…
Reference in a new issue