Re: [Pyobjc-dev] applicationShouldOpenUntitledFile_
Brought to you by:
ronaldoussoren
From: <bb...@ma...> - 2003-02-02 23:07:43
|
On Sunday, Feb 2, 2003, at 16:44 US/Eastern, Ronald Oussoren wrote: > I've just checked in a patch that seems to fix this. From what I have > seen it looks like Objective-C methods that say they return an char > actually return an int, the method stub we insert in the Objective-C > class did return char. Because of this, the return value seen by the > caller of the method contains our return value as well as 3 bytes of > garbage. If your lucky these bytes are all 0. Hmm, methods returning > shorts probably have a simular problem. Use the source, Luke! Seriously -- the objc runtime source is available in Darwin. Going from memory -- yes, anything 4 bytes or less is returned as a 4 byte value and then downcast as necessary. Anything greater than 4 bytes is basically a struct return type and the calling convention is slightly different. b.bum |