*/
PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v);
-/* _PyLong_Divmod_Near. Given integers a and b, compute the nearest
+/* _PyLong_DivmodNear. Given integers a and b, compute the nearest
integer q to the exact quotient a / b, rounding to the nearest even integer
in the case of a tie. Return (q, r), where r = a - q*b. The remainder r
will satisfy abs(r) <= abs(b)/2, with equality possible only if q is
even.
*/
-PyAPI_FUNC(PyObject *) _PyLong_Divmod_Near(PyObject *, PyObject *);
+PyAPI_FUNC(PyObject *) _PyLong_DivmodNear(PyObject *, PyObject *);
/* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in
base 256, and return a Python long with the same numeric value.
PyObject *result;
PyObject *temp;
- temp = _PyLong_Divmod_Near(m, n);
+ temp = _PyLong_DivmodNear(m, n);
if (temp == NULL)
return NULL;
result = PyTuple_GET_ITEM(temp, 0);
round-half-to-even. */
PyObject *
-_PyLong_Divmod_Near(PyObject *a, PyObject *b)
+_PyLong_DivmodNear(PyObject *a, PyObject *b)
{
PyLongObject *quo = NULL, *rem = NULL;
PyObject *one = NULL, *twice_rem, *result, *temp;
if (result == NULL)
return NULL;
- temp = _PyLong_Divmod_Near(self, result);
+ temp = _PyLong_DivmodNear(self, result);
Py_DECREF(result);
result = temp;
if (result == NULL)