summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Objective-C/libobjcl.h3
-rw-r--r--Objective-C/libobjcl.m11
2 files changed, 5 insertions, 9 deletions
diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h
index 236cd3a..b47ab17 100644
--- a/Objective-C/libobjcl.h
+++ b/Objective-C/libobjcl.h
@@ -50,10 +50,9 @@ objcl_invoke_method (OBJCL_OBJ_DATA receiver,
int argc,
...);
-void
+id
objcl_invoke_with_types (void *receiver,
SEL method_selector,
- id *exception,
int argc,
char *return_typespec,
char *arg_typespecs[],
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m
index 18b76ad..d89693a 100644
--- a/Objective-C/libobjcl.m
+++ b/Objective-C/libobjcl.m
@@ -267,20 +267,17 @@ objcl_invoke_method (OBJCL_OBJ_DATA receiver,
#ifdef USE_LIBFFI
-void
+id
objcl_invoke_with_types (void *receiver,
SEL method_selector,
- id *exception,
int argc,
char *return_typespec,
char *arg_typespecs[],
void *return_value,
void **argv)
{
- va_list arglist;
IMP method;
int i;
- void *tmp_arg;
ffi_cif cif;
ffi_type *return_type;
ffi_type *arg_types[argc + 2];
@@ -302,7 +299,6 @@ objcl_invoke_with_types (void *receiver,
method = objc_msg_lookup (receiver, method_selector);
#endif
- *exception = NULL;
return_type = objcl_pyobjc_signature_to_ffi_return_type (return_typespec);
arg_types[0] = id_type;
arg_types[1] = sel_type;
@@ -322,10 +318,11 @@ objcl_invoke_with_types (void *receiver,
}
NS_HANDLER
{
- *exception = localException;
- NS_VOIDRETURN;
+ NS_VALUERETURN (localException, id);
}
NS_ENDHANDLER
+
+ return NULL;
}
#endif