From: Peter G. <pe...@ar...> - 2003-10-26 18:29:56
|
On Sat, 25 Oct 2003 at 23:26:11 +0200, Andr=E1s_Simon wrote: > I agree, following ACL is a good thing. Although in this particular > case, I have some reservations about it, because jfield's argument > conventions look rather baroque to me. I'd gladly give up ACL's > > (jfield class-name field-name nil value) > > for > > (setf (jfield class-name field-name) value). Agreed. And I guess you'd probably want (setf (jfield class-name field-name instance-ref) value) to work for the non-static field case, too. There's no reason why we couldn't implement this in addition to the "standard" ACL interface. > Nevertheless, here's a first attempt to emulate ACL's jfield as it > stands. Besides jfield, I also extended makeLispObject (and I'm not > sure I got it right) just so that even when jfield is used to set a > field, the return value is close to what ACL produces. The comments > '//case n', where n is between 1 and 7, refer to the corresponding > argument list. They sure look ugly, but make this spaghetti easier to > follow, at least for me. Looks good. I've committed this (with a bit of reformatting). Thanks! -Peter |