-
-
Notifications
You must be signed in to change notification settings - Fork 18k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLN: Fix return type for initObjToJSON() #5334
CLN: Fix return type for initObjToJSON() #5334
Conversation
Here's the in-a-nutshell of why this is necessary: http://stackoverflow.com/questions/10509400/difference-between-pymodinit-func-and-pymodule-create In Python 2.X the module init function could return void, in 3.X needs to return |
Thanks @jtratner for digging into this. Fix looks good. |
#if (PY_VERSION_HEX < 0x03000000) | ||
void initObjToJSON(void) | ||
// import_array() compat | ||
#if (PY_VERSION_HEX >= 0x03000000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flipped this to match numpy's format for clarity.
CLN: Fix return type for initObjToJSON()
fyi...this builds on windows! so that is good |
good, and it ought to build on openSUSE too... |
I can confirm this fixes the problem on openSUSE. Thank you for the prompt On Sun, Oct 27, 2013 at 1:41 AM, Jeff Tratner notifications@git.luolix.topwrote:
|
No problem - thanks for reporting this! - it was a subtle error (and it was |
Make it so that it always returns the same thing as numpy, so that it
matches the right signature whether in or not in the error condition.
Closes #5326.