Skip to content

Commit fa68a61

Browse files
committed
Fix naming inconsistency.
1 parent 2872e5b commit fa68a61

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Include/longobject.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,13 +101,13 @@ PyAPI_FUNC(int) _PyLong_Sign(PyObject *v);
101101
*/
102102
PyAPI_FUNC(size_t) _PyLong_NumBits(PyObject *v);
103103

104-
/* _PyLong_Divmod_Near. Given integers a and b, compute the nearest
104+
/* _PyLong_DivmodNear. Given integers a and b, compute the nearest
105105
integer q to the exact quotient a / b, rounding to the nearest even integer
106106
in the case of a tie. Return (q, r), where r = a - q*b. The remainder r
107107
will satisfy abs(r) <= abs(b)/2, with equality possible only if q is
108108
even.
109109
*/
110-
PyAPI_FUNC(PyObject *) _PyLong_Divmod_Near(PyObject *, PyObject *);
110+
PyAPI_FUNC(PyObject *) _PyLong_DivmodNear(PyObject *, PyObject *);
111111

112112
/* _PyLong_FromByteArray: View the n unsigned bytes as a binary integer in
113113
base 256, and return a Python long with the same numeric value.

Modules/datetimemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ divide_nearest(PyObject *m, PyObject *n)
161161
PyObject *result;
162162
PyObject *temp;
163163

164-
temp = _PyLong_Divmod_Near(m, n);
164+
temp = _PyLong_DivmodNear(m, n);
165165
if (temp == NULL)
166166
return NULL;
167167
result = PyTuple_GET_ITEM(temp, 0);

Objects/longobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4218,7 +4218,7 @@ long__format__(PyObject *self, PyObject *args)
42184218
round-half-to-even. */
42194219

42204220
PyObject *
4221-
_PyLong_Divmod_Near(PyObject *a, PyObject *b)
4221+
_PyLong_DivmodNear(PyObject *a, PyObject *b)
42224222
{
42234223
PyLongObject *quo = NULL, *rem = NULL;
42244224
PyObject *one = NULL, *twice_rem, *result, *temp;
@@ -4363,7 +4363,7 @@ long_round(PyObject *self, PyObject *args)
43634363
if (result == NULL)
43644364
return NULL;
43654365

4366-
temp = _PyLong_Divmod_Near(self, result);
4366+
temp = _PyLong_DivmodNear(self, result);
43674367
Py_DECREF(result);
43684368
result = temp;
43694369
if (result == NULL)

0 commit comments

Comments
 (0)