{\rtf1\mac\ansicpg10000\cocoartf824\cocoasubrtf410 {\fonttbl\f0\fswiss\fcharset77 Helvetica;\f1\fswiss\fcharset77 Helvetica-Bold;} {\colortbl;\red255\green255\blue255;} \margl1440\margr1440\vieww9000\viewh8400\viewkind0 \pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\ql\qnatural\pardirnatural \f0\fs24 \cf0 Code from the {\field{\*\fldinst{HYPERLINK "http://openmcl.clozure.com/Doc/index.html#Tutorial_003b-Allocating-Foreign-Data-on-the-Lisp-Heap"}}{\fldrslt Allocating Foreign Data on the Lisp Heap Tutorial}} by {\field{\*\fldinst{HYPERLINK "mailto:bsder@allcaps.org"}}{\fldrslt Andrew P. Lentvorski}}\ \ \f1\b Usage \f0\b0 \ Run from the REPL with: (load #P"ccl:examples;FFI;Allocating-foreign-data-on-the-lisp-heap;ptrtest.lisp")\ (if you use a front-end to OpenMCL such as SLIME via emacs, you will only see the output of the Lisp code in the REPL. View the *inferior-lisp* buffer for the output from the C code)\ \ \f1\b Files \f0\b0 \ ptrtest.lisp - Lisp code that builds the dynamic library from ptrtest.c, loads it, and calls the functions as described in the tutorial\ ptrtest.c - C functions to be called\ ptrtest-compile.sh - Builds the dynamic library from ptrtest.c}