summaryrefslogtreecommitdiff
path: root/Objective-C
diff options
context:
space:
mode:
Diffstat (limited to 'Objective-C')
-rw-r--r--Objective-C/libobjcl.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m
index e6283d2..d1cce2a 100644
--- a/Objective-C/libobjcl.m
+++ b/Objective-C/libobjcl.m
@@ -707,7 +707,7 @@ objcl_create_imp (IMP callback,
const char *arg_typespecs[])
{
ffi_type *return_type;
- ffi_type *arg_types[argc + 2];
+ ffi_type **arg_types;
ffi_status status;
ffi_cif *cif;
ffi_closure *closure;
@@ -728,6 +728,8 @@ objcl_create_imp (IMP callback,
return_type = objcl_pyobjc_signature_to_ffi_return_type (return_typespec);
+ arg_types = malloc ((argc+2) * sizeof (ffi_type *)); /* never freed */
+
arg_types[0] = id_type;
arg_types[1] = sel_type;