Issue 7767: Add PyLong_AsLongLongAndOverflow - Python tracker (original) (raw)

Created on 2010-01-24 01:16 by casevh, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch_longlong.diff casevh,2010-01-24 01:16 Patch for PyLong_AsLongLongAndOverflow.
Messages (5)
msg98203 - (view) Author: Case Van Horsen (casevh) Date: 2010-01-24 01:16
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.
msg98539 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-01-29 21:03
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)?
msg98547 - (view) Author: Case Van Horsen (casevh) Date: 2010-01-30 04:04
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.
msg98556 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-01-30 08:43
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!
msg98558 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2010-01-30 10:31
Applied in r77842 (trunk), r77843 (py3k).
History
Date User Action Args
2022-04-11 14:56:56 admin set github: 52015
2010-01-30 10:31:14 mark.dickinson set status: open -> closedresolution: acceptedmessages: +
2010-01-30 08:43:50 mark.dickinson set messages: +
2010-01-30 04:04:01 casevh set messages: +
2010-01-29 21:03:48 mark.dickinson set messages: +
2010-01-24 09:14:56 mark.dickinson set assignee: mark.dickinsonnosy: + mark.dickinson
2010-01-24 02:09:41 brian.curtin set priority: normalkeywords: + needs reviewversions: + Python 3.2components: + Interpreter Core, - Extension Modulesstage: patch review
2010-01-24 01:16:47 casevh create