X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Freadmacros-mcl.lisp;fp=src%2Freadmacros-mcl.lisp;h=dc1fc6c805b87567c38418bb27a1efdfd6437b08;hb=a95b9a217335917d96b8c0cced4f49c3e4846115;hp=0000000000000000000000000000000000000000;hpb=bcd9fb3deb580f2976e7505a7433795ed6ad1bb3;p=uffi.git diff --git a/src/readmacros-mcl.lisp b/src/readmacros-mcl.lisp new file mode 100644 index 0000000..dc1fc6c --- /dev/null +++ b/src/readmacros-mcl.lisp @@ -0,0 +1,39 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: readmacros-mcl.cl +;;;; Purpose: This file holds functions using read macros for MCL +;;;; Programmer: Kevin M. Rosenberg/John Desoi +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id: readmacros-mcl.lisp,v 1.3 2002/09/30 10:02:36 kevin Exp $ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg +;;;; +;;;; UFFI users are granted the rights to distribute and use this software +;;;; as governed by the terms of the Lisp Lesser GNU Public License +;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL. +;;;; ************************************************************************* + +(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) +(in-package :uffi) + + +;; trap macros don't work right directly in the macros +#+(and mcl (not openmcl)) +(defun new-ptr (size) + (#_NewPtr size)) + +#+(and mcl (not openmcl)) +(defun dispose-ptr (ptr) + (#_DisposePtr ptr)) + +#+openmcl +(defmacro new-ptr (size) + `(ccl::malloc ,size)) + +#+openmcl +(defmacro dispose-ptr (ptr) + `(ccl::free ,ptr)) +