[Openmcl-devel] another make-record question
ch-openmcl at bobobeach.com
Fri Aug 20 08:22:09 PDT 2004
On Aug 20, 2004, at 3:50 AM, Gary Byers wrote:
> MAKE-RECORD's a macro; it processes its first argument at macroexpand
> time and expands any initialization forms in the macro call into
> (SETF (PREF ...) ...) forms.
> See <http://openmcl.clozure.com/Doc/re77.html>
> "Processing the first argument at macroexpand time" -could- be done by
> a non-macro function at runtime, at least in theory. The processing
> in question involves determining the size of the named foreign type or
> record, and you -could- do that at runtime (and #_malloc and #_bzero a
> pointer of that size, assuming that record/type definitions existed at
> runtime.) Would you want to do this ?
I think so. I also think I would like to be able to specify a type in a
variable and be able to make-record of that type at runtime. I'm
attempting to do this in order to allocate a foreign memory block
inside an around method of initialize-instance. Perhaps there is a
better way to do this. Was the "would you want to do this" a rhetorical
question and am I missing the obvious answer here?
More information about the Openmcl-devel