mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +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
|
@ -660,14 +660,6 @@ complex_int(PyObject *v)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
complex_long(PyObject *v)
|
||||
{
|
||||
PyErr_SetString(PyExc_TypeError,
|
||||
"can't convert complex to long; use long(abs(z))");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
complex_float(PyObject *v)
|
||||
{
|
||||
|
@ -1068,7 +1060,7 @@ static PyNumberMethods complex_as_number = {
|
|||
0, /* nb_xor */
|
||||
0, /* nb_or */
|
||||
complex_int, /* nb_int */
|
||||
complex_long, /* nb_long */
|
||||
0, /* nb_long */
|
||||
complex_float, /* nb_float */
|
||||
0, /* nb_inplace_add */
|
||||
0, /* nb_inplace_subtract */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue