Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDouble
commit2d3418a2f4f61772cc2f46b7732709bb8f0dde69
authormark.dickinson <mark.dickinson@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sat, 2 Jan 2010 14:45:40 +0000 (2 14:45 +0000)
committermark.dickinson <mark.dickinson@6015fed2-1504-0410-9fe1-9d1591cc4771>
Sat, 2 Jan 2010 14:45:40 +0000 (2 14:45 +0000)
tree00cc8e6ded1f8e180932aa3fa5636c75e869c262
parentbd6f6278c6f1e5baf08eae17241d690c56999d36
Refactor some longobject internals:  PyLong_AsDouble and _PyLong_AsScaledDouble
(the latter renamed to _PyLong_Frexp) now use the same core code.  The
exponent produced by _PyLong_Frexp now has type Py_ssize_t instead of the
previously used int, and no longer needs scaling by PyLong_SHIFT.  This
frees the math module from having to know anything about the PyLong
implementation.  This closes issue #5576.

git-svn-id: http://svn.python.org/projects/python/trunk@77234 6015fed2-1504-0410-9fe1-9d1591cc4771
Include/longobject.h
Modules/mathmodule.c
Objects/longobject.c