summaryrefslogtreecommitdiff
path: root/Lisp/method-invocation.lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2007-09-16 16:16:01 +0200
committerMatthias Benkard <code@mail.matthias.benkard.de>2007-09-16 16:16:01 +0200
commit3cbca8870fcbbd8adbe7f5e580c7f0ae98086f8d (patch)
treeda7972d66bba9f8f22f1d07387fe336dd2aa8c38 /Lisp/method-invocation.lisp
parent0996dc2fb30011a71b26b3f4845b6e76a0d56314 (diff)
PRIMITIVE-INVOKE: Support non-pointer arguments.
darcs-hash:027144b4dcd760900b90aff40ac18677d50c6a15
Diffstat (limited to 'Lisp/method-invocation.lisp')
-rw-r--r--Lisp/method-invocation.lisp13
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