mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue 4910, patch 2 of (probably) 3: pave the way for renaming of
nb_long: remove last remaining use of nb_long (in the struct module) from the core, set nb_long slots on all builtin and extension types to 0, and remove uses of __long__ in test_complex and test_binop. Reviewed by Benjamin Peterson.
This commit is contained in:
parent
29500f64b6
commit
cce2f217d4
8 changed files with 8 additions and 25 deletions
|
@ -127,8 +127,8 @@ get_pylong(PyObject *v)
|
|||
return v;
|
||||
}
|
||||
m = Py_TYPE(v)->tp_as_number;
|
||||
if (m != NULL && m->nb_long != NULL) {
|
||||
v = m->nb_long(v);
|
||||
if (m != NULL && m->nb_int != NULL) {
|
||||
v = m->nb_int(v);
|
||||
if (v == NULL)
|
||||
return NULL;
|
||||
if (PyLong_Check(v))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue