r2907: *** empty log message ***
[uffi.git] / src / primitives.cl
index 9a982be7bd46f8f690bd4f16ba4c4ccccb3d442a..0c35d8a48960caa2f647be4cb59a6798bf8a9964 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Feb 2002
 ;;;;
-;;;; $Id: primitives.cl,v 1.24 2002/09/30 07:51:01 kevin Exp $
+;;;; $Id: primitives.cl,v 1.25 2002/09/30 08:50:00 kevin Exp $
 ;;;;
 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -74,13 +74,13 @@ supports takes advantage of this optimization."
   #+cmu `(alien:def-alien-type ,name ,(convert-from-uffi-type type :type))
   #+sbcl `(sb-alien:def-alien-type ,name ,(convert-from-uffi-type type :type))
   #+mcl
-  (let ((type (convert-from-uffi-type uffi-type :type)))
-    (unless (or (keywordp type) (consp type))
-      (setf type `(quote ,type)))
+  (let ((mcl-type (convert-from-uffi-type type :type)))
+    (unless (or (keywordp mcl-type) (consp mcl-type))
+      (setf mcl-type `(quote ,mcl-type)))
     #+(and mcl (not openmcl))
-    `(def-mcl-type ,(keyword name) ,type)
+    `(def-mcl-type ,(keyword name) ,mcl-type)
     #+openmcl
-    `(ccl::def-foreign-type ,(keyword name) ,type))  
+    `(ccl::def-foreign-type ,(keyword name) ,mcl-type))  
   )
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
@@ -190,7 +190,7 @@ supports takes advantage of this optimization."
       (:array . :c-array)))
 
 #+(and mcl (not openmcl))
-(defconstant +type-conversion-list+
+(setq +type-conversion-list+
      '((* . :pointer) (:void . :void)
        (:short . :short) (:unsigned-short . :unsigned-short)
        (:pointer-void . :pointer)
@@ -204,7 +204,7 @@ supports takes advantage of this optimization."
        (:array . :array)))
 
 #+openmcl
-(defconstant +type-conversion-list+
+(setq +type-conversion-list+
      '((* . :address) (:void . :void)
        (:short . :short) (:unsigned-short . :unsigned-short)
        (:pointer-void . :address)