Issue #4910, patch 3/3: rename nb_long to nb_reserved · pythoncapi/cpython@8055afd · GitHub
Skip to content

Commit 8055afd

Browse files
committed
Issue python#4910, patch 3/3: rename nb_long to nb_reserved
1 parent 0bbcc4c commit 8055afd

12 files changed

Lines changed: 19 additions & 14 deletions

File tree

Doc/c-api/typeobj.rst

Lines changed: 7 additions & 1 deletion

Include/object.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ typedef struct {
219219
binaryfunc nb_xor;
220220
binaryfunc nb_or;
221221
unaryfunc nb_int;
222-
unaryfunc nb_long;
222+
void *nb_reserved; /* the slot formerly known as nb_long */
223223
unaryfunc nb_float;
224224

225225
binaryfunc nb_inplace_add;

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ What's New in Python 3.1 alpha 0
1212
Core and Builtins
1313
-----------------
1414

15+
- Issue #4910: Rename nb_long slot to nb_reserved, and change its
16+
type to (void *).
17+
1518
- Issue #4935: The overflow checking code in the expandtabs() method common
1619
to str, bytes and bytearray could be optimized away by the compiler, letting
1720
the interpreter segfault instead of raising an error.

Modules/datetimemodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2111,7 +2111,7 @@ static PyNumberMethods delta_as_number = {
21112111
0, /*nb_xor*/
21122112
0, /*nb_or*/
21132113
0, /*nb_int*/
2114-
0, /*nb_long*/
2114+
0, /*nb_reserved*/
21152115
0, /*nb_float*/
21162116
0, /*nb_inplace_add*/
21172117
0, /*nb_inplace_subtract*/

Objects/boolobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ static PyNumberMethods bool_as_number = {
109109
bool_xor, /* nb_xor */
110110
bool_or, /* nb_or */
111111
0, /* nb_int */
112-
0, /* nb_long */
112+
0, /* nb_reserved */
113113
0, /* nb_float */
114114
0, /* nb_inplace_add */
115115
0, /* nb_inplace_subtract */

Objects/complexobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ static PyNumberMethods complex_as_number = {
10601060
0, /* nb_xor */
10611061
0, /* nb_or */
10621062
complex_int, /* nb_int */
1063-
0, /* nb_long */
1063+
0, /* nb_reserved */
10641064
complex_float, /* nb_float */
10651065
0, /* nb_inplace_add */
10661066
0, /* nb_inplace_subtract */

Objects/floatobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1798,7 +1798,7 @@ static PyNumberMethods float_as_number = {
17981798
0, /*nb_xor*/
17991799
0, /*nb_or*/
18001800
float_trunc, /*nb_int*/
1801-
0, /*nb_long*/
1801+
0, /*nb_reserved*/
18021802
float_float, /*nb_float*/
18031803
0, /* nb_inplace_add */
18041804
0, /* nb_inplace_subtract */

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3830,7 +3830,7 @@ static PyNumberMethods long_as_number = {
38303830
long_xor, /*nb_xor*/
38313831
long_or, /*nb_or*/
38323832
long_long, /*nb_int*/
3833-
0, /*nb_long*/
3833+
0, /*nb_reserved*/
38343834
long_float, /*nb_float*/
38353835
0, /* nb_inplace_add */
38363836
0, /* nb_inplace_subtract */

Objects/setobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2082,7 +2082,7 @@ static PyNumberMethods set_as_number = {
20822082
(binaryfunc)set_xor, /*nb_xor*/
20832083
(binaryfunc)set_or, /*nb_or*/
20842084
0, /*nb_int*/
2085-
0, /*nb_long*/
2085+
0, /*nb_reserved*/
20862086
0, /*nb_float*/
20872087
0, /*nb_inplace_add*/
20882088
(binaryfunc)set_isub, /*nb_inplace_subtract*/

Objects/typeobject.c

Lines changed: 0 additions & 4 deletions

0 commit comments

Comments
 (0)