89f3551a99795a89bd68529454279287a9c6fa47
[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.lisp
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$
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 (in-package #:uffi)
20
21
22 ;; trap macros don't work right directly in the macros
23 #+(and mcl (not openmcl))
24 (defun new-ptr (size)
25   (#_NewPtr size))
26
27 #+(and mcl (not openmcl))
28 (defun dispose-ptr (ptr)
29   (#_DisposePtr ptr))
30
31 #+openmcl
32 (defmacro new-ptr (size)
33   `(ccl::malloc ,size))
34
35 #+openmcl
36 (defmacro dispose-ptr (ptr)
37   `(ccl::free ,ptr))
38