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
PyLong_As* methods should not call nb_int. #51799
Comments
The following C-API functions: PyLong_AsLongAndOverflow call nb_int for inputs that don't satisfy PyLong_Check. They thus accept The uses of these functions within the Python source should be checked, to |
Since PyLong_AsLong goes through PyLong_AsLongAndOverflow, this change |
Just as an experiment, I removed the calls to nb_int and ran the test- The test_math failure was from math.factorial depending on PyLong_AsLong One consequence of not having PyLong_AsLong automatically call nb_int |
It turns out this is intimately bound up with the behaviour of |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: