2010/9/14 Chun Tian (binghe) binghe.lisp@gmail.com:
Hi, Alessio
Thanks for your information.
I think, if you can make JARRAY-SET or (SETF JARRAY-REF) directly use Lisp (signed-byte 8) numbers, that will be better.
Right. We already handle bytes right in direct method calls, so there's no need to enhance jcoerce, just fixing jarray-set will do.
Great.
Beside, Java booleans has the same problem, I have to use (make-immediate-object t :boolean) and (make-immediate-object nil :boolean) to fill method arguments when they need "boolean". Why not let us just use T and NIL?
T works as a boolean, IIRC. With NIL, there's the problem that it's normally used to mean null rather than false.
OK, I can live with current state. I defined two constants for this and re-use them every time when needed:
(defconstant +java-true+ (make-immediate-object t :boolean)) (defconstant +java-false+ (make-immediate-object nil :boolean))
--binghe