summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
Diffstat (limited to '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