From b1a461fd11fd36685704fd8c2a03362c417c4a97 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 4 Mar 2008 17:46:59 +0100 Subject: Support simple CFFI types as typespecs. darcs-hash:08236de112dc806e436b6d48a24d7922e33e801a --- Lisp/tests.lisp | 2 +- Lisp/type-conversion.lisp | 4 ++-- Lisp/type-handling.lisp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'Lisp') diff --git a/Lisp/tests.lisp b/Lisp/tests.lisp index c2ba1d6..6783855 100644 --- a/Lisp/tests.lisp +++ b/Lisp/tests.lisp @@ -416,7 +416,7 @@ :type list :initargs (:foos)) (:name foo-count - :foreign-type (:int ()))) + :foreign-type :int)) :metaclass (find-objc-meta-class "NSObject")))) ;; Class initialisation. diff --git a/Lisp/type-conversion.lisp b/Lisp/type-conversion.lisp index 1350f5c..df9b0e0 100644 --- a/Lisp/type-conversion.lisp +++ b/Lisp/type-conversion.lisp @@ -25,7 +25,7 @@ (typespec-primary-type typespec)) ((id objective-c-class exception selector) (let ((*skip-retaining* skip-retaining-p)) - (intern-pointer-wrapper (car typespec) + (intern-pointer-wrapper (car (typespec typespec)) :pointer (cffi:mem-ref foreign-value-cell c-type)))) ((:char :unsigned-char) @@ -39,4 +39,4 @@ ;; FOREIGN-VALUE-LISP-MANAGED-P to false. (make-struct-wrapper foreign-value-cell typespec t)) ((:void) (values)) - (otherwise (cffi:mem-ref foreign-value-cell c-type))))) \ No newline at end of file + (otherwise (cffi:mem-ref foreign-value-cell c-type))))) diff --git a/Lisp/type-handling.lisp b/Lisp/type-handling.lisp index dfb84e7..a37f756 100644 --- a/Lisp/type-handling.lisp +++ b/Lisp/type-handling.lisp @@ -301,7 +301,7 @@ Returns: (VALUES typespec byte-position string-position)" ;; type found. (cadr (find-if #'(lambda (x) (and (consp x) (eq (car x) 'nominally))) - (cadr typespec)))) + (cadr (typespec typespec))))) (defun typespec-primary-type (typespec) -- cgit v1.2.3