[armedbear-devel] SETF for JFEILDS
Erik Huelsmann
ehuels at gmail.com
Wed Dec 30 22:14:06 UTC 2009
On Tue, Dec 22, 2009 at 8:06 PM, Alessio Stalla <alessiostalla at gmail.com> wrote:
> On Tue, Nov 24, 2009 at 10:27 PM, <logicmoo at gmail.com> wrote:
>> Thanks, you are right, much better to use the built-in key stuff
>>
>> (defun (setf jfield) (newvalue class-ref-or-field field-or-instance
>> &optional ( instance nil instance-supplied-p) unused-value)
>> (declare (ignore unused-value))
>> (if instance-supplied-p
>> (jfield class-ref-or-field field-or-instance instance newvalue)
>> (jfield class-ref-or-field field-or-instance newvalue)))
>
> I have tentatively included this code in java.lisp in my local copy of
> abcl, with the intention to commit it to trunk. It works like a charm,
> but I have a problem: how can I tell abcl to autoload java.lisp if it
> sees (setf (jfield ...)) for the first time?
You can't: the autoloader seems to work with symbols only; I've made
the preloaded-function-proxy work with SETF functions too, so, you can
lookup there how to do it. You'll just need to invent a syntax for the
lisp side: multi-symbol lists are already taken for installing the
autoloader on multiple symbols.
Bye,
Erik.
More information about the armedbear-devel
mailing list