X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fprimitives.lisp;h=6147753d8847a874b1afe7238d6b2666d199ad37;hb=579b6d8e7ce89151996dd3ea9c29bb4419a4a8ed;hp=6abd855bb5fe9b0cd704391c3a8aad64758e665a;hpb=772583326d24ba87e8f3a3fbab5c27664ba2b2a1;p=uffi.git diff --git a/src/primitives.lisp b/src/primitives.lisp index 6abd855..6147753 100644 --- a/src/primitives.lisp +++ b/src/primitives.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: primitives.lisp,v 1.1 2002/09/30 10:02:36 kevin Exp $ +;;;; $Id: primitives.lisp,v 1.2 2002/10/01 17:05:29 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -54,10 +54,8 @@ (defmacro def-type (name type) "Generates a (deftype) statement for CL. Currently, only CMUCL supports takes advantage of this optimization." - #+(or lispworks allegro mcl) - (declare (ignore type)) - #+(or lispworks allegro mcl) - `(deftype ,name () t) + #+(or lispworks allegro mcl cormanlisp) (declare (ignore type)) + #+(or lispworks allegro mcl cormanlisp) `(deftype ,name () t) #+cmu `(deftype ,name () '(alien:alien ,(convert-from-uffi-type type :declare))) #+sbcl @@ -73,6 +71,7 @@ supports takes advantage of this optimization." #+allegro `(ff:def-foreign-type ,name ,(convert-from-uffi-type type :type)) #+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)) + #+cormanlisp `(ct:defctype ,name ,(convert-from-uffi-type type :type)) #+mcl (let ((mcl-type (convert-from-uffi-type type :type))) (unless (or (keywordp mcl-type) (consp mcl-type)) @@ -157,7 +156,7 @@ supports takes advantage of this optimization." (:float . float) (:double . double) (:array . array))) -#+allegro +#+(or allegro cormanlisp) (setq +type-conversion-list+ '((* . *) (:void . :void) (:short . :short) @@ -236,7 +235,7 @@ supports takes advantage of this optimization." "Converts from a uffi type to an implementation specific type" (if (atom type) (cond - #+allegro + #+(or allegro cormanlisp) ((and (or (eq context :routine) (eq context :return)) (eq type :cstring)) (setq type '((* :char) integer)))