Fix bug where callObjC() missclassified methods taking an object and returning an object.
git-svn-id: http://svn.berlios.de/svnroot/repos/oolite-linux/trunk@5392 127b21dd-08f5-0310-b4b7-95ae10353056
This commit is contained in:
parent
aa15e3e1bc
commit
5f518f0c5f
@ -103,7 +103,7 @@ BOOL OOJSCallObjCObjectMethod(JSContext *context, id object, NSString *oo_jsClas
|
||||
[PLAYER setScriptTarget:object];
|
||||
}
|
||||
|
||||
selectorString = OOStringFromJSValue(context,argv[0]);
|
||||
selectorString = OOStringFromJSValue(context, argv[0]);
|
||||
|
||||
// Join all parameters together with spaces.
|
||||
if (1 < argc && [selectorString hasSuffix:@":"])
|
||||
@ -226,13 +226,14 @@ static BOOL SignatureMatch(NSMethodSignature *sig, SEL selector)
|
||||
static MethodType GetMethodType(id object, SEL selector)
|
||||
{
|
||||
NSMethodSignature *sig = [object methodSignatureForSelector:selector];
|
||||
MethodType type = (MethodType)OOShaderUniformTypeFromMethodSignature(sig);
|
||||
if (type != kMethodTypeInvalid) return type;
|
||||
|
||||
if (SignatureMatch(sig, @selector(voidVoidMethod))) return kMethodTypeVoidVoid;
|
||||
if (SignatureMatch(sig, @selector(voidObjectMethod:))) return kMethodTypeVoidObject;
|
||||
if (SignatureMatch(sig, @selector(objectObjectMethod:))) return kMethodTypeObjectObject;
|
||||
|
||||
MethodType type = (MethodType)OOShaderUniformTypeFromMethodSignature(sig);
|
||||
if (type != kMethodTypeInvalid) return type;
|
||||
|
||||
return kMethodTypeInvalid;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user