r2912: rename .cl to .lisp
[uffi.git] / src / objects-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:       UFFI source to handle objects and pointers
7 ;;;; Programmer:    Kevin M. Rosenberg
8 ;;;; Date Started:  Feb 2002
9 ;;;;
10 ;;;; $Id: objects-mcl.lisp,v 1.1 2002/09/30 10:02:36 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 ;; trap macros don't work right directly in the macros
23 (eval-when (:compile-toplevel :load-toplevel :execute)
24
25   #+(and mcl (not openmcl))
26   (defun new-ptr (size)
27     (#_NewPtr size))
28          
29   #+(and mcl (not openmcl))
30   (defun dispose-ptr (ptr)
31     (#_DisposePtr ptr))
32   
33   #+openmcl
34   (defmacro new-ptr (size)
35     `(ccl::malloc ,size))
36          
37   #+openmcl
38   (defmacro dispose-ptr (ptr)
39     `(ccl::free ,ptr))
40   )
41   
42