-
-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Add PyLong_AsLongLongAndOverflow #52015
Comments
There are "Long" and "LongLong" variants for most of the C API functions that work with PyLong. This patch adds a "LongLong" version of PyLong_AsLongAndOverflow. This function will be helpful on 64-bit Windows platforms to quickly get a 64-bit integer or detect the need for multiple precision (or overflow). I can use this functionality for gmpy. |
The proposed addition sounds entirely reasonable to me. In your patch, is there a reason for leaving out the first PyInt_Check (compare with PyLong_AsLongAndOverflow)? |
The missing PyInt_Check is a mistake. I probably thought I was working on a py3k version. Let me know if I should create a new patch or if I should create one for py3k. Thanks for the review. |
Ok, great. I'll add the PyInt_Check back in and commit the patch, then. I just wanted to check that I wasn't missing something obvious. Thank you! |
Applied in r77842 (trunk), r77843 (py3k). |
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: