Comment 2 for bug 508567

Revision history for this message
yak (yak) wrote :

Thanks for the fix.

This depends on the calling convention. It's true that C prefers a convention where the caller is responsible for clearing the stack. Otherwise functions like printf() wouldn't be possible. But there are conventions forcing the callee to do the cleanup and in such case, calling the function with arglist of different size will cause problems. That's why I think the arglists should stay consistent if there's no real reason for not making them so.

I found this while trying to force pybindgen to generate code for Nokia's Python for S60 so I could wrap some Symbian C++ classes with it. I had the situation where the code would work on the S60 emulator but fail on the phone (some unexpected behavior while reading an instance attribute). I'm not sure if this was the cause but it was one of the few things I changed before it started working. I'm also not sure which calling convention is used on Symbian/GCCE.