You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
Activity
casevh commentedon Jan 24, 2010
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.
mdickinson commentedon Jan 29, 2010
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)?
casevh commentedon Jan 30, 2010
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.
mdickinson commentedon Jan 30, 2010
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!
mdickinson commentedon Jan 30, 2010
Applied in r77842 (trunk), r77843 (py3k).