[armedbear-devel] How to use JARRAY-SET to fill a byte array?
Chun Tian (binghe)
binghe.lisp at gmail.com
Tue Sep 14 09:50:43 UTC 2010
> 2010/9/14 Chun Tian (binghe) <binghe.lisp at 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.
>> 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))
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2603 bytes
Desc: not available
More information about the armedbear-devel