[issue7528] Provide PyLong_AsLongAndOverflow compatibility to Python 2.x
Mark Dickinson
report at bugs.python.org
Sun Dec 20 11:20:10 CET 2009
Mark Dickinson <dickinsm at gmail.com> added the comment:
The longobject.diff patch looks fine, modulo some whitespace nits. (Older
C source files use width-8 tabs for indentation.)
Are you interested in adding documentation and tests (the latter in the
test_capi module)?
One thing about the patch struck me as odd: the use of nb_int means that
PyLong_AsLongAndOverflow will happily accept floats, Decimal instances,
etc. Ideally, this would be nb_index instead, but I guess it has to stay
nb_int for now, for consistency with PyLong_AsLong. py3k also uses nb_int
here and in various other PyLong_As*** functions; I think these should be
changed, but that's another issue.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7528>
_______________________________________
More information about the Python-bugs-list
mailing list