* src/primitives.lisp: Add support for :union types
[patch from Cyrus Harmon]
* tests/union.lisp, tests/structs.lisp: Tests for
union and structure types [from Cyrus Harmon]
+2005-03-03 Kevin Rosenberg (kevin@rosenberg.net)
+ * src/primitives.lisp: Add support for :union types
+ [patch from Cyrus Harmon]
+ * tests/union.lisp, tests/structs.lisp: Tests for
+ union and structure types [from Cyrus Harmon]
+
2005-02-22 Kevin Rosenberg (kevin@rosenberg.net)
* src/primitives.lisp, src/strings.lisp: Better support
for sb-unicode [from Yoshinori Tahara and R. Mattes]
2005-02-22 Kevin Rosenberg (kevin@rosenberg.net)
* src/primitives.lisp, src/strings.lisp: Better support
for sb-unicode [from Yoshinori Tahara and R. Mattes]
+cl-uffi (1.4.33-1) unstable; urgency=low
+
+ * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org> Wed, 2 Mar 2005 12:25:43 -0700
+
cl-uffi (1.4.32-1) unstable; urgency=low
* New upstream
cl-uffi (1.4.32-1) unstable; urgency=low
* New upstream
#+mcl `(:struct ,(%convert-from-uffi-type (cadr type) :struct))
#-mcl (%convert-from-uffi-type (cadr type) :struct)
)
#+mcl `(:struct ,(%convert-from-uffi-type (cadr type) :struct))
#-mcl (%convert-from-uffi-type (cadr type) :struct)
)
- (t
- (cons (%convert-from-uffi-type (first type) context)
- (%convert-from-uffi-type (rest type) context)))))))
+ (:union
+ #+mcl `(:union ,(%convert-from-uffi-type (cadr type) :union))
+ #-mcl (%convert-from-uffi-type (cadr type) :union)
+ )
+ (t
+ (cons (%convert-from-uffi-type (first type) context)
+ (%convert-from-uffi-type (rest type) context)))))))
(defun convert-from-uffi-type (type context)
(let ((result (%convert-from-uffi-type type context)))
(defun convert-from-uffi-type (type context)
(let ((result (%convert-from-uffi-type type context)))
+(deftest structs.2
+ (progn
+ (uffi:def-foreign-type foo-struct (:struct foo))
+ t)
+ t)
(deftest union.3 (plusp (uffi:get-slot-value *u* 'tunion1 'uint)) t)
(deftest union.3 (plusp (uffi:get-slot-value *u* 'tunion1 'uint)) t)
+(uffi:def-union foo-u
+ (bar :pointer-self))
+
+(uffi:def-foreign-type foo-u-ptr (* foo-u))
+
+;; tests that compilation worked
+(deftest unions.4
+ (with-foreign-object (p 'foo-u)
+ t)
+ t)
+
+(deftest unions.5
+ (progn
+ (uffi:def-foreign-type foo-union (:union foo-u))
+ t)
+ t)
+
+
+