summaryrefslogtreecommitdiff
path: root/Objective-C
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-09-15 18:08:56 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-09-15 18:08:56 +0200
commit73ca06d6c103bae75e837e2966c757a42d3a7969 (patch)
tree54f13275c99b61b860b5470e37d9a2c10a914543 /Objective-C
parentb1edef93d6a53a09e3b3a8806712286e2968f998 (diff)
Objective-C layer: Simplify the interface of objcl_invoke_with_types.
darcs-hash:0f8730bc7a0fe966016fda8582a52a2b5f3e667d
Diffstat (limited to 'Objective-C')
-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