Re: [Pyobjc-dev] contextInfo Parameters: Sometimes Ints and Sometimes Pointers
Brought to you by:
ronaldoussoren
From: Michael T. <li...@mj...> - 2006-04-19 18:43:39
|
On Apr 19, 2006, at 2:14 PM, Ronald Oussoren wrote: > On 17-apr-2006, at 21:29, Michael Tsai wrote: >> >> More generally, I don't see how PyObjC can make all ("unless >> otherwise noted") contextInfos ints when many of the methods whose >> signatures would need to be modified are undocumented. > > There's code in objc._convenience.py that assumes that all > contextInfo's where the ObjC argument specification is a 'void*' > are just cookies. The method signature for those is translated into > an integer because that seems to be the best we can do without > risking random crashes. Right, but what happens when it encounters an undocumented selector that doesn't include ":contextInfo:" but does have a void*? At present, it doesn't treat this parameter as an integer, and this causes problems when the parameter is actually a contextInfo, as explained in my previous message. Perhaps it would be better to treat void* parameters as integers by default. --Michael |