[Openmcl-devel] wrapping foreign objects in lisp classes

Cyrus Harmon ch-openmcl at bobobeach.com
Mon Aug 16 13:41:19 PDT 2004

Ok, so I've finally managed to get Helmut's new gcc-3.4.1 (thanks!) 
ffigen stuff working and I've managed to get the filename translation 
stuff set up so I don't have to muck with my openmcl directory and I've 
managed to create the cdb's and read them in. So far so good. Now I 
think I have a non-openmcl-specific question but one that's arisen due 
to using the interface database stuff in openmcl, so here goes...

What's the best way (a good way?) to make a class with slots that 
encapsulates a foreign struct? I can read and write the fields in 
question, but it would seem to be a bit cleaner (if slower) to use lisp 
classes and slots for this. I thought it would be straightforward to 
set up a custom reader and writer to do this. It sort of seemed to work 
for a while but then stopped which made me wonder if I was doing 
something wrong. Is this a reasonable approach? Can someone help me 
understand how to make the setf stuff work with a writer where the 
storage for the slot is a foreign variable rather than a built-in slot?



More information about the Openmcl-devel mailing list