mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 22:21:29 +00:00
Fixed: Return NULL when out of bounce
This commit is contained in:
+18
-2
@@ -1031,13 +1031,29 @@ GLOBAL(method_getTypes) = function(/*Method*/ aMethod)
|
||||
GLOBAL(method_copyReturnType) = function(/*Method*/ aMethod)
|
||||
{
|
||||
var types = aMethod.method_types;
|
||||
return types ? types[0] : NULL;
|
||||
|
||||
if (types)
|
||||
{
|
||||
var argType = types[0];
|
||||
|
||||
return argType != NULL ? argType : NULL;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GLOBAL(method_copyArgumentType) = function(/*Method*/ aMethod, /*unsigned int*/ index)
|
||||
{
|
||||
var types = aMethod.method_types;
|
||||
return types ? types[index + 1] : NULL;
|
||||
|
||||
if (types)
|
||||
{
|
||||
var argType = types[index + 1];
|
||||
|
||||
return argType != NULL ? argType : NULL;
|
||||
}
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
GLOBAL(method_getImplementation) = function(/*Method*/ aMethod)
|
||||
|
||||
Reference in New Issue
Block a user