From 33d61cbd7c4017d4f7832b331721cf00000a8c0b Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Fri, 15 Aug 2008 23:22:41 +0200 Subject: MLKCompiledClosure: Add debugging messages. --- MLKCompiledClosure.m | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MLKCompiledClosure.m b/MLKCompiledClosure.m index c2ab290..6737acc 100644 --- a/MLKCompiledClosure.m +++ b/MLKCompiledClosure.m @@ -86,9 +86,16 @@ format:@"FFI type is invalid (this is probably a bug)."]; } + NSLog (@"Calling %p (argc = %d)", _code, argc); + _code(0, MLKEndOfArgumentsMarker); + for (i = 0; i < argc; i++) + { + NSLog (@"Argument %d: %p", i, *((void**)argv[i])); + } + ffi_call (&cif, FFI_FN (_code), &return_value, (void**)argv); - // FIXME + // FIXME: multiple values return [NSArray arrayWithObject:nullify(return_value)]; } -- cgit v1.2.3