summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2013-12-01 01:58:53 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2013-12-01 01:58:53 (GMT)
commit2ccf8e969c5e870a6c416ac7970c9f94c0da86fd (patch)
tree9a56def10252b7ab1e154db3f23c64a0aa5481f3
parent3c23e7a5dcbc1972bd9e26dc26e61d856abb51f1 (diff)
parent65846c6c5190a92446176f318fd837c6005cfa29 (diff)
downloadcpython-2ccf8e969c5e870a6c416ac7970c9f94c0da86fd.zip
cpython-2ccf8e969c5e870a6c416ac7970c9f94c0da86fd.tar.gz
cpython-2ccf8e969c5e870a6c416ac7970c9f94c0da86fd.tar.bz2
Issue #6477: Merge with 3.3.
-rw-r--r--Include/object.h4
-rw-r--r--Modules/_pickle.c4
-rw-r--r--Objects/object.c12
3 files changed, 10 insertions, 10 deletions
diff --git a/Include/object.h b/Include/object.h
index cc22ae9..f539652 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -829,8 +829,8 @@ they can have object code that is not dependent on Python compilation flags.
PyAPI_FUNC(void) Py_IncRef(PyObject *);
PyAPI_FUNC(void) Py_DecRef(PyObject *);
-PyAPI_DATA(PyTypeObject) PyNone_Type;
-PyAPI_DATA(PyTypeObject) PyNotImplemented_Type;
+PyAPI_DATA(PyTypeObject) _PyNone_Type;
+PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
/*
_Py_NoneStruct is an object of undefined type which can be used in contexts
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index 6445238..c8afa8e 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -3305,13 +3305,13 @@ save_singleton_type(PicklerObject *self, PyObject *obj, PyObject *singleton)
static int
save_type(PicklerObject *self, PyObject *obj)
{
- if (obj == (PyObject *)&PyNone_Type) {
+ if (obj == (PyObject *)&_PyNone_Type) {
return save_singleton_type(self, obj, Py_None);
}
else if (obj == (PyObject *)&PyEllipsis_Type) {
return save_singleton_type(self, obj, Py_Ellipsis);
}
- else if (obj == (PyObject *)&PyNotImplemented_Type) {
+ else if (obj == (PyObject *)&_PyNotImplemented_Type) {
return save_singleton_type(self, obj, Py_NotImplemented);
}
return save_global(self, obj, NULL);
diff --git a/Objects/object.c b/Objects/object.c
index 8ccc91c..62bdb49 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -1409,7 +1409,7 @@ static PyNumberMethods none_as_number = {
0, /* nb_index */
};
-PyTypeObject PyNone_Type = {
+PyTypeObject _PyNone_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"NoneType",
0,
@@ -1452,7 +1452,7 @@ PyTypeObject PyNone_Type = {
PyObject _Py_NoneStruct = {
_PyObject_EXTRA_INIT
- 1, &PyNone_Type
+ 1, &_PyNone_Type
};
/* NotImplemented is an object that can be used to signal that an
@@ -1494,7 +1494,7 @@ notimplemented_dealloc(PyObject* ignore)
Py_FatalError("deallocating NotImplemented");
}
-PyTypeObject PyNotImplemented_Type = {
+PyTypeObject _PyNotImplemented_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"NotImplementedType",
0,
@@ -1537,7 +1537,7 @@ PyTypeObject PyNotImplemented_Type = {
PyObject _Py_NotImplementedStruct = {
_PyObject_EXTRA_INIT
- 1, &PyNotImplemented_Type
+ 1, &_PyNotImplemented_Type
};
void
@@ -1567,10 +1567,10 @@ _Py_ReadyTypes(void)
if (PyType_Ready(&PyList_Type) < 0)
Py_FatalError("Can't initialize list type");
- if (PyType_Ready(&PyNone_Type) < 0)
+ if (PyType_Ready(&_PyNone_Type) < 0)
Py_FatalError("Can't initialize None type");
- if (PyType_Ready(&PyNotImplemented_Type) < 0)
+ if (PyType_Ready(&_PyNotImplemented_Type) < 0)
Py_FatalError("Can't initialize NotImplemented type");
if (PyType_Ready(&PyTraceBack_Type) < 0)