From 3cbca8870fcbbd8adbe7f5e580c7f0ae98086f8d Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 16 Sep 2007 16:16:01 +0200 Subject: PRIMITIVE-INVOKE: Support non-pointer arguments. darcs-hash:027144b4dcd760900b90aff40ac18677d50c6a15 --- Lisp/method-invocation.lisp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'Lisp') diff --git a/Lisp/method-invocation.lisp b/Lisp/method-invocation.lisp index ec1913f..a9e9336 100644 --- a/Lisp/method-invocation.lisp +++ b/Lisp/method-invocation.lisp @@ -221,10 +221,15 @@ Returns: *result* --- the return value of the method invocation. (string (alloc-pointer-and-register (alloc-string-and-register arg))) - (t (alloc-pointer-and-register - (typecase arg - (c-pointer-wrapper (pointer-to arg)) - (t arg)))))) + ((or c-pointer-wrapper + c-pointer) + (alloc-pointer-and-register + (typecase arg + (c-pointer-wrapper (pointer-to arg)) + (t arg)))) + (t (cffi:foreign-alloc (type-name->c-type + type-name) + :initial-element arg)))) (setf (cffi:mem-aref arg-types '(:pointer :char) i) (alloc-string-and-register (typecase arg -- cgit v1.2.3