mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
add code to compare types ignoring qualifiers
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36864 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d6de673472
commit
3e37fb8647
1 changed files with 5 additions and 2 deletions
|
@ -32,6 +32,7 @@
|
|||
#import "Foundation/NSInvocation.h"
|
||||
#import "Foundation/NSMethodSignature.h"
|
||||
#import "Foundation/NSValue.h"
|
||||
#import "GNUstepBase/GSObjCRuntime.h"
|
||||
|
||||
@implementation NSInvocationOperation
|
||||
|
||||
|
@ -97,12 +98,14 @@
|
|||
{
|
||||
const char *returnType = [[_invocation methodSignature] methodReturnType];
|
||||
|
||||
if (0 == strncmp(@encode(void), returnType, 1))
|
||||
if (0 == strncmp(@encode(void),
|
||||
GSSkipTypeQualifierAndLayoutInfo(returnType), 1))
|
||||
{
|
||||
[NSException raise: (id)NSInvocationOperationVoidResultException
|
||||
format: @"*** %s: void result", __PRETTY_FUNCTION__];
|
||||
}
|
||||
else if (0 == strncmp(@encode(id), returnType, 1))
|
||||
else if (0 == strncmp(@encode(id),
|
||||
GSSkipTypeQualifierAndLayoutInfo(returnType), 1))
|
||||
{
|
||||
[_invocation getReturnValue: &result];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue