]> granicus.if.org Git - python/commit
Refactor some longobject internals: PyLong_AsDouble and _PyLong_AsScaledDouble
authorMark Dickinson <dickinsm@gmail.com>
Sat, 2 Jan 2010 14:45:40 +0000 (14:45 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 2 Jan 2010 14:45:40 +0000 (14:45 +0000)
commitd3e323215c6d9f303bf42875f98e365e2ff1734f
treeed54ecbd1cf3e030812d3b7024a6eeb8b375b7bb
parent5a485c188e56b36b6cfaa2ae942c1ee40b877315
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.
Include/longobject.h
Modules/mathmodule.c
Objects/longobject.c