Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 17c7cd8

Browse files
committed
Replace PyNumber_Int with PyNumber_Long.
1 parent e4bc7f6 commit 17c7cd8

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

Modules/_struct.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ get_long(PyObject *v, long *p)
155155
PyErr_Clear();
156156
if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2) < 0)
157157
return -1;
158-
o = PyNumber_Int(v);
158+
o = PyNumber_Long(v);
159159
if (o == NULL)
160160
return -1;
161161
res = get_long(o, p);
@@ -260,7 +260,7 @@ get_wrapped_long(PyObject *v, long *p)
260260
PyErr_Clear();
261261
if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2) < 0)
262262
return -1;
263-
o = PyNumber_Int(v);
263+
o = PyNumber_Long(v);
264264
if (o == NULL)
265265
return -1;
266266
res = get_wrapped_long(o, p);
@@ -299,7 +299,7 @@ get_wrapped_ulong(PyObject *v, unsigned long *p)
299299
PyErr_Clear();
300300
if (PyErr_WarnEx(PyExc_DeprecationWarning, FLOAT_COERCE, 2) < 0)
301301
return -1;
302-
o = PyNumber_Int(v);
302+
o = PyNumber_Long(v);
303303
if (o == NULL)
304304
return -1;
305305
res = get_wrapped_ulong(o, p);

Modules/grpmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ grp_getgrgid(PyObject *self, PyObject *pyo_id)
9090
unsigned int gid;
9191
struct group *p;
9292

93-
py_int_id = PyNumber_Int(pyo_id);
93+
py_int_id = PyNumber_Long(pyo_id);
9494
if (!py_int_id)
9595
return NULL;
9696
gid = PyLong_AS_LONG(py_int_id);

Modules/selectmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ poll_poll(pollObject *self, PyObject *args)
515515
return NULL;
516516
}
517517
else {
518-
tout = PyNumber_Int(tout);
518+
tout = PyNumber_Long(tout);
519519
if (!tout)
520520
return NULL;
521521
timeout = PyLong_AsLong(tout);

Objects/weakrefobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ WRAP_BINARY(proxy_rshift, PyNumber_Rshift)
488488
WRAP_BINARY(proxy_and, PyNumber_And)
489489
WRAP_BINARY(proxy_xor, PyNumber_Xor)
490490
WRAP_BINARY(proxy_or, PyNumber_Or)
491-
WRAP_UNARY(proxy_int, PyNumber_Int)
491+
WRAP_UNARY(proxy_int, PyNumber_Long)
492492
WRAP_UNARY(proxy_float, PyNumber_Float)
493493
WRAP_BINARY(proxy_iadd, PyNumber_InPlaceAdd)
494494
WRAP_BINARY(proxy_isub, PyNumber_InPlaceSubtract)

0 commit comments

Comments
 (0)