[Openmcl-devel] when is :<BOOL> == T?

Gary Byers gb at clozure.com
Fri Aug 5 15:03:08 PDT 2005



On Fri, 5 Aug 2005, Randall Beer wrote:

> As far as I recall, :<BOOL>s always expect T/NIL, unless this has changed in 
> the new SEND stuff that Gary has been doing.  I *think* that any untyped 
> argument in a DEFINE-OBJC-METHOD defaults to :ID, which is probably not what 
> you want.
>
> Randy
>

The only recent related change that I'm aware of is that there's a
real :<BOOL> foreign type in the pre-0.14.4 lisp; the interface
translator treats :<BOOL> as being a primitive, built-in type, and the
bridge gets method type signatures from the interface database instead
of by querying the ObjC runtime.  (The way that the runtime encodes
types, it wasn't possible to reliably distinguish between :<BOOL> and
:signed-char, but it worked fairly well to assume that :signed-char
meant :<BOOL> except in certain known/declared exceptional cases.)

One case in which :<BOOL> and BOOLEAN aren't automatically mapped
back and forth is SLOT-VALUE; the value of a slot of foreign-type
:<BOOL> is #$YES or #NO, not t/nil.  This probably doesn't come up
that often (there's at least one case of it in the demo IDE), but
it might be simpler if everything in the bridge consistently mapped
between :<BOOL> and BOOLEAN without this special case.



More information about the Openmcl-devel mailing list