X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fmcl%2Fprimitives.cl;h=1cf7011e027ce79d910aa6d78ae0d9f56546e8e3;hb=28a219078020ff986e6010cef96e83b062823f71;hp=57f3b174b941c7c149ce2bcf20eb76987ac1fe34;hpb=5bd05c7e835ff4ce78e6eb9c928a6f71471ce528;p=uffi.git diff --git a/src/mcl/primitives.cl b/src/mcl/primitives.cl index 57f3b17..1cf7011 100644 --- a/src/mcl/primitives.cl +++ b/src/mcl/primitives.cl @@ -1,15 +1,16 @@ -;;;; -*- Mode: ANSI-Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: primitives.cl ;;;; Purpose: UFFI source to handle immediate types -;;;; Programmer: Kevin M. Rosenberg +;;;; Programmers: Kevin M. Rosenberg and John DeSoi ;;;; Date Started: Feb 2002 ;;;; -;;;; $Id: primitives.cl,v 1.1 2002/04/04 05:03:14 desoi Exp $ +;;;; $Id: primitives.cl,v 1.4 2002/04/23 00:35:47 desoi Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; and John DeSoi ;;;; ;;;; UFFI users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License @@ -19,6 +20,10 @@ (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) (in-package :uffi) +; Wrapper for unexported function we have to use +(defmacro def-mcl-type (name type) + `(ccl::def-mactype (quote ,name) (ccl:find-mactype ,type))) + (defmacro def-constant (name value &key (export nil)) "Macro to define a constant and to export it" @@ -36,8 +41,10 @@ supports takes advantage of this optimization." "Returns T if character is NULL" `(zerop ,val)) + (defmacro def-foreign-type (name type) - `(ccl::def-mactype ,name ,(ccl:find-mactype (convert-from-uffi-type type :type)))) + `(def-mcl-type ,name (convert-from-uffi-type ,type :type))) + (eval-when (:compile-toplevel :load-toplevel :execute) (defvar +type-conversion-hash+ (make-hash-table :size 20)))