summaryrefslogtreecommitdiff
path: root/Lisp
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-03-04 17:46:59 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-03-04 17:46:59 +0100
commitb1a461fd11fd36685704fd8c2a03362c417c4a97 (patch)
treec48f958a0b5866e3b0c7f50ab1349ff4884ac3f2 /Lisp
parent2e0809c9cf80f7c6d95c5cd21ae4374941c5fd17 (diff)
Support simple CFFI types as typespecs.
darcs-hash:08236de112dc806e436b6d48a24d7922e33e801a
Diffstat (limited to 'Lisp')
-rw-r--r--Lisp/tests.lisp2
-rw-r--r--Lisp/type-conversion.lisp4
-rw-r--r--Lisp/type-handling.lisp2
3 files changed, 4 insertions, 4 deletions
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)