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
8055afd0
Commit
8055afd0
authored
Jan 17, 2009
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #4910, patch 3/3: rename nb_long to nb_reserved
parent
0bbcc4cf
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
19 additions
and
14 deletions
+19
-14
Doc/c-api/typeobj.rst
Doc/c-api/typeobj.rst
+7
-1
Include/object.h
Include/object.h
+1
-1
Misc/NEWS
Misc/NEWS
+3
-0
Modules/datetimemodule.c
Modules/datetimemodule.c
+1
-1
Objects/boolobject.c
Objects/boolobject.c
+1
-1
Objects/complexobject.c
Objects/complexobject.c
+1
-1
Objects/floatobject.c
Objects/floatobject.c
+1
-1
Objects/longobject.c
Objects/longobject.c
+1
-1
Objects/setobject.c
Objects/setobject.c
+1
-1
Objects/typeobject.c
Objects/typeobject.c
+0
-4
Objects/weakrefobject.c
Objects/weakrefobject.c
+1
-1
PC/winreg.c
PC/winreg.c
+1
-1
No files found.
Doc/c-api/typeobj.rst
View file @
8055afd0
...
...
@@ -1057,7 +1057,7 @@ Number Object Structures
binaryfunc nb_xor;
binaryfunc nb_or;
unaryfunc nb_int;
unaryfunc nb_long
;
void *nb_reserved
;
unaryfunc nb_float;
binaryfunc nb_inplace_add;
...
...
@@ -1088,6 +1088,12 @@ Number Object Structures
``Py_NotImplemented``, if another error occurred they must return ``NULL``
and set an exception.
.. note::
The :cdata:`nb_reserved` field should always be ``NULL``. It
was previously called :cdata:`nb_long`, and was renamed in
Python 3.0.1.
.. _mapping-structs:
...
...
Include/object.h
View file @
8055afd0
...
...
@@ -219,7 +219,7 @@ typedef struct {
binaryfunc
nb_xor
;
binaryfunc
nb_or
;
unaryfunc
nb_int
;
unaryfunc
nb_long
;
void
*
nb_reserved
;
/* the slot formerly known as nb_long */
unaryfunc
nb_float
;
binaryfunc
nb_inplace_add
;
...
...
Misc/NEWS
View file @
8055afd0
...
...
@@ -12,6 +12,9 @@ What's New in Python 3.1 alpha 0
Core and Builtins
-----------------
- Issue #4910: Rename nb_long slot to nb_reserved, and change its
type to (void *).
- Issue #4935: The overflow checking code in the expandtabs() method common
to str, bytes and bytearray could be optimized away by the compiler, letting
the interpreter segfault instead of raising an error.
...
...
Modules/datetimemodule.c
View file @
8055afd0
...
...
@@ -2111,7 +2111,7 @@ static PyNumberMethods delta_as_number = {
0
,
/*nb_xor*/
0
,
/*nb_or*/
0
,
/*nb_int*/
0
,
/*nb_
long
*/
0
,
/*nb_
reserved
*/
0
,
/*nb_float*/
0
,
/*nb_inplace_add*/
0
,
/*nb_inplace_subtract*/
...
...
Objects/boolobject.c
View file @
8055afd0
...
...
@@ -109,7 +109,7 @@ static PyNumberMethods bool_as_number = {
bool_xor
,
/* nb_xor */
bool_or
,
/* nb_or */
0
,
/* nb_int */
0
,
/* nb_
long
*/
0
,
/* nb_
reserved
*/
0
,
/* nb_float */
0
,
/* nb_inplace_add */
0
,
/* nb_inplace_subtract */
...
...
Objects/complexobject.c
View file @
8055afd0
...
...
@@ -1060,7 +1060,7 @@ static PyNumberMethods complex_as_number = {
0
,
/* nb_xor */
0
,
/* nb_or */
complex_int
,
/* nb_int */
0
,
/* nb_
long
*/
0
,
/* nb_
reserved
*/
complex_float
,
/* nb_float */
0
,
/* nb_inplace_add */
0
,
/* nb_inplace_subtract */
...
...
Objects/floatobject.c
View file @
8055afd0
...
...
@@ -1798,7 +1798,7 @@ static PyNumberMethods float_as_number = {
0
,
/*nb_xor*/
0
,
/*nb_or*/
float_trunc
,
/*nb_int*/
0
,
/*nb_
long
*/
0
,
/*nb_
reserved
*/
float_float
,
/*nb_float*/
0
,
/* nb_inplace_add */
0
,
/* nb_inplace_subtract */
...
...
Objects/longobject.c
View file @
8055afd0
...
...
@@ -3830,7 +3830,7 @@ static PyNumberMethods long_as_number = {
long_xor
,
/*nb_xor*/
long_or
,
/*nb_or*/
long_long
,
/*nb_int*/
0
,
/*nb_
long
*/
0
,
/*nb_
reserved
*/
long_float
,
/*nb_float*/
0
,
/* nb_inplace_add */
0
,
/* nb_inplace_subtract */
...
...
Objects/setobject.c
View file @
8055afd0
...
...
@@ -2082,7 +2082,7 @@ static PyNumberMethods set_as_number = {
(
binaryfunc
)
set_xor
,
/*nb_xor*/
(
binaryfunc
)
set_or
,
/*nb_or*/
0
,
/*nb_int*/
0
,
/*nb_
long
*/
0
,
/*nb_
reserved
*/
0
,
/*nb_float*/
0
,
/*nb_inplace_add*/
(
binaryfunc
)
set_isub
,
/*nb_inplace_subtract*/
...
...
Objects/typeobject.c
View file @
8055afd0
...
...
@@ -3602,7 +3602,6 @@ inherit_slots(PyTypeObject *type, PyTypeObject *base)
COPYNUM
(
nb_xor
);
COPYNUM
(
nb_or
);
COPYNUM
(
nb_int
);
COPYNUM
(
nb_long
);
COPYNUM
(
nb_float
);
COPYNUM
(
nb_inplace_add
);
COPYNUM
(
nb_inplace_subtract
);
...
...
@@ -4827,7 +4826,6 @@ SLOT1BIN(slot_nb_xor, nb_xor, "__xor__", "__rxor__")
SLOT1BIN
(
slot_nb_or
,
nb_or
,
"__or__"
,
"__ror__"
)
SLOT0
(
slot_nb_int
,
"__int__"
)
SLOT0
(
slot_nb_long
,
"__long__"
)
SLOT0
(
slot_nb_float
,
"__float__"
)
SLOT1
(
slot_nb_inplace_add
,
"__iadd__"
,
PyObject
*
,
"O"
)
SLOT1
(
slot_nb_inplace_subtract
,
"__isub__"
,
PyObject
*
,
"O"
)
...
...
@@ -5443,8 +5441,6 @@ static slotdef slotdefs[] = {
RBINSLOT
(
"__ror__"
,
nb_or
,
slot_nb_or
,
"|"
),
UNSLOT
(
"__int__"
,
nb_int
,
slot_nb_int
,
wrap_unaryfunc
,
"int(x)"
),
UNSLOT
(
"__long__"
,
nb_long
,
slot_nb_long
,
wrap_unaryfunc
,
"int(x)"
),
UNSLOT
(
"__float__"
,
nb_float
,
slot_nb_float
,
wrap_unaryfunc
,
"float(x)"
),
NBSLOT
(
"__index__"
,
nb_index
,
slot_nb_index
,
wrap_unaryfunc
,
...
...
Objects/weakrefobject.c
View file @
8055afd0
...
...
@@ -594,7 +594,7 @@ static PyNumberMethods proxy_as_number = {
proxy_xor
,
/*nb_xor*/
proxy_or
,
/*nb_or*/
proxy_int
,
/*nb_int*/
0
,
/*nb_
long
*/
0
,
/*nb_
reserved
*/
proxy_float
,
/*nb_float*/
proxy_iadd
,
/*nb_inplace_add*/
proxy_isub
,
/*nb_inplace_subtract*/
...
...
PC/winreg.c
View file @
8055afd0
...
...
@@ -451,7 +451,7 @@ static PyNumberMethods PyHKEY_NumberMethods =
PyHKEY_binaryFailureFunc
,
/* nb_xor */
PyHKEY_binaryFailureFunc
,
/* nb_or */
PyHKEY_intFunc
,
/* nb_int */
0
,
/* nb_
long
*/
0
,
/* nb_
reserved
*/
PyHKEY_unaryFailureFunc
,
/* nb_float */
};
...
...
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