r2905: *** empty log message ***
[uffi.git] / src / readmacros-mcl.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          readmacros-mcl.cl
6 ;;;; Purpose:       This file holds functions using read macros for MCL
7 ;;;; Programmer:    Kevin M. Rosenberg/John Desoi
8 ;;;; Date Started:  Feb 2002
9 ;;;;
10 ;;;; $Id: readmacros-mcl.lisp,v 1.1 2002/09/30 07:51:01 kevin Exp $
11 ;;;;
12 ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
13 ;;;;
14 ;;;; UFFI users are granted the rights to distribute and use this software
15 ;;;; as governed by the terms of the Lisp Lesser GNU Public License
16 ;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
17 ;;;; *************************************************************************
18
19 (declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0)))
20 (in-package :uffi)
21
22
23 ;; trap macros don't work right directly in the macros
24 #+(and mcl (not openmcl))
25 (defun new-ptr (size)
26   (#_NewPtr size))
27
28 #+(and mcl (not openmcl))
29 (defun dispose-ptr (ptr)
30   (#_DisposePtr ptr))
31
32 #+openmcl
33 (defmacro new-ptr (size)
34   `(ccl::malloc ,size))
35
36 #+openmcl
37 (defmacro dispose-ptr (ptr)
38   `(ccl::free ,ptr))
39