Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ccf8e9

Browse files
committed
Issue #6477: Merge with 3.3.
2 parents 3c23e7a + 65846c6 commit 2ccf8e9

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

Include/object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,8 +829,8 @@ they can have object code that is not dependent on Python compilation flags.
829829
PyAPI_FUNC(void) Py_IncRef(PyObject *);
830830
PyAPI_FUNC(void) Py_DecRef(PyObject *);
831831

832-
PyAPI_DATA(PyTypeObject) PyNone_Type;
833-
PyAPI_DATA(PyTypeObject) PyNotImplemented_Type;
832+
PyAPI_DATA(PyTypeObject) _PyNone_Type;
833+
PyAPI_DATA(PyTypeObject) _PyNotImplemented_Type;
834834

835835
/*
836836
_Py_NoneStruct is an object of undefined type which can be used in contexts

Modules/_pickle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,13 +3305,13 @@ save_singleton_type(PicklerObject *self, PyObject *obj, PyObject *singleton)
33053305
static int
33063306
save_type(PicklerObject *self, PyObject *obj)
33073307
{
3308-
if (obj == (PyObject *)&PyNone_Type) {
3308+
if (obj == (PyObject *)&_PyNone_Type) {
33093309
return save_singleton_type(self, obj, Py_None);
33103310
}
33113311
else if (obj == (PyObject *)&PyEllipsis_Type) {
33123312
return save_singleton_type(self, obj, Py_Ellipsis);
33133313
}
3314-
else if (obj == (PyObject *)&PyNotImplemented_Type) {
3314+
else if (obj == (PyObject *)&_PyNotImplemented_Type) {
33153315
return save_singleton_type(self, obj, Py_NotImplemented);
33163316
}
33173317
return save_global(self, obj, NULL);

Objects/object.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ static PyNumberMethods none_as_number = {
14091409
0, /* nb_index */
14101410
};
14111411

1412-
PyTypeObject PyNone_Type = {
1412+
PyTypeObject _PyNone_Type = {
14131413
PyVarObject_HEAD_INIT(&PyType_Type, 0)
14141414
"NoneType",
14151415
0,
@@ -1452,7 +1452,7 @@ PyTypeObject PyNone_Type = {
14521452

14531453
PyObject _Py_NoneStruct = {
14541454
_PyObject_EXTRA_INIT
1455-
1, &PyNone_Type
1455+
1, &_PyNone_Type
14561456
};
14571457

14581458
/* NotImplemented is an object that can be used to signal that an
@@ -1494,7 +1494,7 @@ notimplemented_dealloc(PyObject* ignore)
14941494
Py_FatalError("deallocating NotImplemented");
14951495
}
14961496

1497-
PyTypeObject PyNotImplemented_Type = {
1497+
PyTypeObject _PyNotImplemented_Type = {
14981498
PyVarObject_HEAD_INIT(&PyType_Type, 0)
14991499
"NotImplementedType",
15001500
0,
@@ -1537,7 +1537,7 @@ PyTypeObject PyNotImplemented_Type = {
15371537

15381538
PyObject _Py_NotImplementedStruct = {
15391539
_PyObject_EXTRA_INIT
1540-
1, &PyNotImplemented_Type
1540+
1, &_PyNotImplemented_Type
15411541
};
15421542

15431543
void
@@ -1567,10 +1567,10 @@ _Py_ReadyTypes(void)
15671567
if (PyType_Ready(&PyList_Type) < 0)
15681568
Py_FatalError("Can't initialize list type");
15691569

1570-
if (PyType_Ready(&PyNone_Type) < 0)
1570+
if (PyType_Ready(&_PyNone_Type) < 0)
15711571
Py_FatalError("Can't initialize None type");
15721572

1573-
if (PyType_Ready(&PyNotImplemented_Type) < 0)
1573+
if (PyType_Ready(&_PyNotImplemented_Type) < 0)
15741574
Py_FatalError("Can't initialize NotImplemented type");
15751575

15761576
if (PyType_Ready(&PyTraceBack_Type) < 0)

0 commit comments

Comments
 (0)