Re: [Pyobjc-dev] caution with BOOL parameters
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-03-01 21:39:18
|
On Saturday, Mar 1, 2003, at 15:18 US/Eastern, Ronald Oussoren wrote: > On Saturday, Mar 1, 2003, at 20:56 Europe/Amsterdam, Bob Pasker wrote: >> this begs the question: in pyobjc, is the 'c' in a method signature >> ONLY used for BOOL types? > Nope, 'c' is used for 'char', hence the _C_CHR ;-) ;-). What does _C_BFLD mean? I had used it successfully in the past for a BOOL, but I don't remember why it worked or what it really means. > I'm afraid this is one of the places where the bridge cannot be > completely transparent. In Python you can use any object as a boolean > (most are evaluated as true, some are false), but with PyObjC you'll > have to use small integers. I suppose that if the method really does want a (char) vs. a (BOOL), then typecasting and losing the implied precision would be bad. However, for (BOOL) methods, an (int) can be passed in pure ObjC.... b.bum |