summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-09-28 00:02:43 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-09-28 00:02:43 +0200
commit6299a2e95697c68c8b50f95e360e3ae367f6deb6 (patch)
treed8011b586dbc756d6fd4f538b24ffafcfbd4d1ef
parentcb2ea09b8b18e63f6e55b91fdca52aac73a3a96d (diff)
MLKCompiledClosure, MLKForeignProcedure: Fix return value buffer type for libffi.
-rw-r--r--MLKCompiledClosure.m4
-rw-r--r--MLKForeignProcedure.m4
2 files changed, 4 insertions, 4 deletions
diff --git a/MLKCompiledClosure.m b/MLKCompiledClosure.m
index 73f308b..32caf74 100644
--- a/MLKCompiledClosure.m
+++ b/MLKCompiledClosure.m
@@ -63,7 +63,7 @@
ffi_status status;
void *argv[argc];
id argpointers[argc - 1];
- id return_value;
+ ffi_arg return_value;
int i;
arg_types[0] = &ffi_type_pointer;
@@ -95,7 +95,7 @@
ffi_call (&cif, FFI_FN (_code), &return_value, (void**)argv);
// FIXME: multiple values
- return [NSArray arrayWithObject:nullify(return_value)];
+ return [NSArray arrayWithObject:nullify((id)return_value)];
}
-(NSString *) description
diff --git a/MLKForeignProcedure.m b/MLKForeignProcedure.m
index 1374924..ce4ac8a 100644
--- a/MLKForeignProcedure.m
+++ b/MLKForeignProcedure.m
@@ -67,7 +67,7 @@
ffi_type *return_type;
ffi_status status;
void *argv[argc];
- id return_value;
+ ffi_arg return_value;
int i;
for (i = 0; i < argc; i++)
@@ -95,7 +95,7 @@
if (return_type == &ffi_type_void)
return [NSArray array];
else
- return [NSArray arrayWithObject:nullify (MLKLispValueWithForeignValue (&return_value, _returnType))];
+ return [NSArray arrayWithObject:nullify (MLKLispValueWithForeignValue ((id*)&return_value, _returnType))];
}
-(NSString *) description