Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
d371cae4
Commit
d371cae4
authored
Jun 11, 2008
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nb_reserved (nb_coerce), nb_hex, and nb_oct from PyNumberMethods
parent
d3d473cc
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
3 additions
and
32 deletions
+3
-32
Doc/c-api/typeobj.rst
Doc/c-api/typeobj.rst
+0
-4
Include/object.h
Include/object.h
+0
-4
Misc/NEWS
Misc/NEWS
+3
-0
Modules/datetimemodule.c
Modules/datetimemodule.c
+0
-3
Objects/boolobject.c
Objects/boolobject.c
+0
-3
Objects/complexobject.c
Objects/complexobject.c
+0
-3
Objects/floatobject.c
Objects/floatobject.c
+0
-3
Objects/longobject.c
Objects/longobject.c
+0
-3
Objects/setobject.c
Objects/setobject.c
+0
-3
Objects/weakrefobject.c
Objects/weakrefobject.c
+0
-3
PC/winreg.c
PC/winreg.c
+0
-3
No files found.
Doc/c-api/typeobj.rst
View file @
d371cae4
...
...
@@ -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;
...
...
Include/object.h
View file @
d371cae4
...
...
@@ -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
;
...
...
Misc/NEWS
View file @
d371cae4
...
...
@@ -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
-----------------
...
...
Modules/datetimemodule.c
View file @
d371cae4
...
...
@@ -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*/
...
...
Objects/boolobject.c
View file @
d371cae4
...
...
@@ -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 */
...
...
Objects/complexobject.c
View file @
d371cae4
...
...
@@ -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*/
...
...
Objects/floatobject.c
View file @
d371cae4
...
...
@@ -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 */
...
...
Objects/longobject.c
View file @
d371cae4
...
...
@@ -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 */
...
...
Objects/setobject.c
View file @
d371cae4
...
...
@@ -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*/
...
...
Objects/weakrefobject.c
View file @
d371cae4
...
...
@@ -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*/
...
...
PC/winreg.c
View file @
d371cae4
...
...
@@ -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 */
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment