Re: [Pyobjc-dev] caution with BOOL parameters
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-03-01 21:42:43
|
On Saturday, Mar 1, 2003, at 16:08 US/Eastern, Bob Pasker wrote: > i see, you mean _C_CHR is used when an objc method has a > unadorned char in the signature. > > why not define "_C_BOOL", which is special-cased in the pythonify/ > depythonify routines to handled any range of integer, strings, > None/not None, etc., akin _C_[U]LNGLNG. The various _C_* types are defined by Objective-C itself. See /usr/include/objc/objc-class.h. They are used to figure out how to convert the various arguments of an ObjC method to/from Python. Every ObjC method has a selector and a signature. The selector is the name of the method -- "setObject:forKey:" or "arrayWithArray:" or "hash". The signature contains the type information for the arguments and return value. A signature of "c@:@@i" means: - return a char - arg 0 is an object (self) - arg 1 is a selector (_cmd -- the name of the method being invoked... very handy, that) - arg 2 and 3 are objects - arg 4 is an integer The compiler generates the signatures at compile time. They signatures 090astored in the OBJC segments within the mach-o executable. b.bum |