summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/c-api/typeobj.rst4
-rw-r--r--Include/object.h4
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/datetimemodule.c3
-rw-r--r--Objects/boolobject.c3
-rw-r--r--Objects/complexobject.c3
-rw-r--r--Objects/floatobject.c3
-rw-r--r--Objects/longobject.c3
-rw-r--r--Objects/setobject.c3
-rw-r--r--Objects/weakrefobject.c3
-rw-r--r--PC/winreg.c3
11 files changed, 3 insertions, 32 deletions
diff --git a/Doc/c-api/typeobj.rst b/Doc/c-api/typeobj.rst
index 8ea61b0..8031c10 100644
--- a/Doc/c-api/typeobj.rst
+++ b/Doc/c-api/typeobj.rst
@@ -1049,13 +1049,9 @@ Number Object Structures
binaryfunc nb_and;
binaryfunc nb_xor;
binaryfunc nb_or;
- int nb_reserved; /* unused, must be zero */
unaryfunc nb_int;
unaryfunc nb_long;
unaryfunc nb_float;
-
- unaryfunc nb_oct; /* not used anymore, must be zero */
- unaryfunc nb_hex; /* not used anymore, must be zero */
binaryfunc nb_inplace_add;
binaryfunc nb_inplace_subtract;
diff --git a/Include/object.h b/Include/object.h
index 2a7075f..1e92975 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -215,13 +215,9 @@ typedef struct {
binaryfunc nb_and;
binaryfunc nb_xor;
binaryfunc nb_or;
- int nb_reserved; /* unused, used to be nb_coerce */
unaryfunc nb_int;
unaryfunc nb_long;
unaryfunc nb_float;
- /* NB: nb_oct and nb_hex are not used anymore. */
- unaryfunc nb_oct;
- unaryfunc nb_hex;
binaryfunc nb_inplace_add;
binaryfunc nb_inplace_subtract;
diff --git a/Misc/NEWS b/Misc/NEWS
index 5d29093..17fe598 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -60,6 +60,9 @@ Core and Builtins
f_exc_type, f_exc_value, and f_exc_traceback cannot be accessed from Python
code anymore.
+- Three of PyNumberMethods' members, nb_coerce, nb_hex, and nb_oct, have been
+ removed.
+
Extension Modules
-----------------
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c
index 7d44b24..6c2d5a0 100644
--- a/Modules/datetimemodule.c
+++ b/Modules/datetimemodule.c
@@ -2103,12 +2103,9 @@ static PyNumberMethods delta_as_number = {
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
- 0, /*nb_reserved*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
- 0, /*nb_oct*/
- 0, /*nb_hex*/
0, /*nb_inplace_add*/
0, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
diff --git a/Objects/boolobject.c b/Objects/boolobject.c
index dfea7f4..59a66d5 100644
--- a/Objects/boolobject.c
+++ b/Objects/boolobject.c
@@ -108,12 +108,9 @@ static PyNumberMethods bool_as_number = {
bool_and, /* nb_and */
bool_xor, /* nb_xor */
bool_or, /* nb_or */
- 0, /* nb_reserved */
0, /* nb_int */
0, /* nb_long */
0, /* nb_float */
- 0, /* nb_oct */
- 0, /* nb_hex */
0, /* nb_inplace_add */
0, /* nb_inplace_subtract */
0, /* nb_inplace_multiply */
diff --git a/Objects/complexobject.c b/Objects/complexobject.c
index 2e501fc..75283a0 100644
--- a/Objects/complexobject.c
+++ b/Objects/complexobject.c
@@ -1067,12 +1067,9 @@ static PyNumberMethods complex_as_number = {
0, /* nb_and */
0, /* nb_xor */
0, /* nb_or */
- 0, /* nb_reserved */
complex_int, /* nb_int */
complex_long, /* nb_long */
complex_float, /* nb_float */
- 0, /* nb_oct */
- 0, /* nb_hex */
0, /* nb_inplace_add */
0, /* nb_inplace_subtract */
0, /* nb_inplace_multiply*/
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index dd3ea93..db1c99f 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -1381,12 +1381,9 @@ static PyNumberMethods float_as_number = {
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
- 0, /*nb_reserved*/
float_trunc, /*nb_int*/
float_trunc, /*nb_long*/
float_float, /*nb_float*/
- 0, /* nb_oct */
- 0, /* nb_hex */
0, /* nb_inplace_add */
0, /* nb_inplace_subtract */
0, /* nb_inplace_multiply */
diff --git a/Objects/longobject.c b/Objects/longobject.c
index d0d4d3a..d1c27e6 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -3713,12 +3713,9 @@ static PyNumberMethods long_as_number = {
long_and, /*nb_and*/
long_xor, /*nb_xor*/
long_or, /*nb_or*/
- 0, /*nb_reserved*/
long_long, /*nb_int*/
long_long, /*nb_long*/
long_float, /*nb_float*/
- 0, /*nb_oct*/ /* not used */
- 0, /*nb_hex*/ /* not used */
0, /* nb_inplace_add */
0, /* nb_inplace_subtract */
0, /* nb_inplace_multiply */
diff --git a/Objects/setobject.c b/Objects/setobject.c
index 4456ef4..e5c89e5 100644
--- a/Objects/setobject.c
+++ b/Objects/setobject.c
@@ -2015,12 +2015,9 @@ static PyNumberMethods set_as_number = {
(binaryfunc)set_and, /*nb_and*/
(binaryfunc)set_xor, /*nb_xor*/
(binaryfunc)set_or, /*nb_or*/
- 0, /*nb_reserved*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
- 0, /*nb_oct*/
- 0, /*nb_hex*/
0, /*nb_inplace_add*/
(binaryfunc)set_isub, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index 2f86ae8..040e938 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -594,12 +594,9 @@ static PyNumberMethods proxy_as_number = {
proxy_and, /*nb_and*/
proxy_xor, /*nb_xor*/
proxy_or, /*nb_or*/
- 0, /*nb_reserved*/
proxy_int, /*nb_int*/
proxy_long, /*nb_long*/
proxy_float, /*nb_float*/
- 0, /*nb_oct*/
- 0, /*nb_hex*/
proxy_iadd, /*nb_inplace_add*/
proxy_isub, /*nb_inplace_subtract*/
proxy_imul, /*nb_inplace_multiply*/
diff --git a/PC/winreg.c b/PC/winreg.c
index d0397e9..571209f 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -450,12 +450,9 @@ static PyNumberMethods PyHKEY_NumberMethods =
PyHKEY_binaryFailureFunc, /* nb_and */
PyHKEY_binaryFailureFunc, /* nb_xor */
PyHKEY_binaryFailureFunc, /* nb_or */
- 0, /* nb_reserved */
PyHKEY_intFunc, /* nb_int */
PyHKEY_unaryFailureFunc, /* nb_long */
PyHKEY_unaryFailureFunc, /* nb_float */
- PyHKEY_unaryFailureFunc, /* nb_oct */
- PyHKEY_unaryFailureFunc, /* nb_hex */
};