From 6299a2e95697c68c8b50f95e360e3ae367f6deb6 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 28 Sep 2008 00:02:43 +0200 Subject: MLKCompiledClosure, MLKForeignProcedure: Fix return value buffer type for libffi. --- MLKCompiledClosure.m | 4 ++-- MLKForeignProcedure.m | 4 ++-- 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 -- cgit v1.2.3