diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-16 16:16:01 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-09-16 16:16:01 +0200 |
commit | 3cbca8870fcbbd8adbe7f5e580c7f0ae98086f8d (patch) | |
tree | da7972d66bba9f8f22f1d07387fe336dd2aa8c38 /Lisp | |
parent | 0996dc2fb30011a71b26b3f4845b6e76a0d56314 (diff) |
PRIMITIVE-INVOKE: Support non-pointer arguments.
darcs-hash:027144b4dcd760900b90aff40ac18677d50c6a15
Diffstat (limited to 'Lisp')
-rw-r--r-- | Lisp/method-invocation.lisp | 13 |
1 files changed, 9 insertions, 4 deletions
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 |