[Python-checkins] r68651 - in python/branches/py3k: Doc/c-api/typeobj.rst Include/object.h Misc/NEWS Modules/datetimemodule.c Objects/boolobject.c Objects/complexobject.c Objects/floatobject.c Objects/longobject.c Objects/setobject.c Objects/typeobject.c Objects/weakrefobject.c PC/winreg.c
mark.dickinson
python-checkins at python.org
Sat Jan 17 11:04:46 CET 2009
Author: mark.dickinson
Date: Sat Jan 17 11:04:45 2009
New Revision: 68651
Log:
Issue #4910, patch 3/3: rename nb_long to nb_reserved
Modified:
python/branches/py3k/Doc/c-api/typeobj.rst
python/branches/py3k/Include/object.h
python/branches/py3k/Misc/NEWS
python/branches/py3k/Modules/datetimemodule.c
python/branches/py3k/Objects/boolobject.c
python/branches/py3k/Objects/complexobject.c
python/branches/py3k/Objects/floatobject.c
python/branches/py3k/Objects/longobject.c
python/branches/py3k/Objects/setobject.c
python/branches/py3k/Objects/typeobject.c
python/branches/py3k/Objects/weakrefobject.c
python/branches/py3k/PC/winreg.c
Modified: python/branches/py3k/Doc/c-api/typeobj.rst
==============================================================================
--- python/branches/py3k/Doc/c-api/typeobj.rst (original)
+++ python/branches/py3k/Doc/c-api/typeobj.rst Sat Jan 17 11:04:45 2009
@@ -1057,7 +1057,7 @@
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 @@
``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:
Modified: python/branches/py3k/Include/object.h
==============================================================================
--- python/branches/py3k/Include/object.h (original)
+++ python/branches/py3k/Include/object.h Sat Jan 17 11:04:45 2009
@@ -219,7 +219,7 @@
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;
Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS (original)
+++ python/branches/py3k/Misc/NEWS Sat Jan 17 11:04:45 2009
@@ -12,6 +12,9 @@
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.
Modified: python/branches/py3k/Modules/datetimemodule.c
==============================================================================
--- python/branches/py3k/Modules/datetimemodule.c (original)
+++ python/branches/py3k/Modules/datetimemodule.c Sat Jan 17 11:04:45 2009
@@ -2111,7 +2111,7 @@
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*/
Modified: python/branches/py3k/Objects/boolobject.c
==============================================================================
--- python/branches/py3k/Objects/boolobject.c (original)
+++ python/branches/py3k/Objects/boolobject.c Sat Jan 17 11:04:45 2009
@@ -109,7 +109,7 @@
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 */
Modified: python/branches/py3k/Objects/complexobject.c
==============================================================================
--- python/branches/py3k/Objects/complexobject.c (original)
+++ python/branches/py3k/Objects/complexobject.c Sat Jan 17 11:04:45 2009
@@ -1060,7 +1060,7 @@
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 */
Modified: python/branches/py3k/Objects/floatobject.c
==============================================================================
--- python/branches/py3k/Objects/floatobject.c (original)
+++ python/branches/py3k/Objects/floatobject.c Sat Jan 17 11:04:45 2009
@@ -1798,7 +1798,7 @@
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 */
Modified: python/branches/py3k/Objects/longobject.c
==============================================================================
--- python/branches/py3k/Objects/longobject.c (original)
+++ python/branches/py3k/Objects/longobject.c Sat Jan 17 11:04:45 2009
@@ -3830,7 +3830,7 @@
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 */
Modified: python/branches/py3k/Objects/setobject.c
==============================================================================
--- python/branches/py3k/Objects/setobject.c (original)
+++ python/branches/py3k/Objects/setobject.c Sat Jan 17 11:04:45 2009
@@ -2082,7 +2082,7 @@
(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*/
Modified: python/branches/py3k/Objects/typeobject.c
==============================================================================
--- python/branches/py3k/Objects/typeobject.c (original)
+++ python/branches/py3k/Objects/typeobject.c Sat Jan 17 11:04:45 2009
@@ -3602,7 +3602,6 @@
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_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 @@
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,
Modified: python/branches/py3k/Objects/weakrefobject.c
==============================================================================
--- python/branches/py3k/Objects/weakrefobject.c (original)
+++ python/branches/py3k/Objects/weakrefobject.c Sat Jan 17 11:04:45 2009
@@ -594,7 +594,7 @@
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*/
Modified: python/branches/py3k/PC/winreg.c
==============================================================================
--- python/branches/py3k/PC/winreg.c (original)
+++ python/branches/py3k/PC/winreg.c Sat Jan 17 11:04:45 2009
@@ -451,7 +451,7 @@
PyHKEY_binaryFailureFunc, /* nb_xor */
PyHKEY_binaryFailureFunc, /* nb_or */
PyHKEY_intFunc, /* nb_int */
- 0, /* nb_long */
+ 0, /* nb_reserved */
PyHKEY_unaryFailureFunc, /* nb_float */
};
More information about the Python-checkins
mailing list