diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2013-12-01 01:55:48 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2013-12-01 01:55:48 (GMT) |
commit | 65846c6c5190a92446176f318fd837c6005cfa29 (patch) | |
tree | a1b01b9f99a3705ae3d949fb683c234c62f317cc /Objects/object.c | |
parent | 19b6fa6ebb887e498437b4ae87d6e70b92b4742b (diff) | |
download | cpython-65846c6c5190a92446176f318fd837c6005cfa29.zip cpython-65846c6c5190a92446176f318fd837c6005cfa29.tar.gz cpython-65846c6c5190a92446176f318fd837c6005cfa29.tar.bz2 |
Issue #6477: Keep PyNotImplemented_Type and PyNone_Type private.
Diffstat (limited to 'Objects/object.c')
-rw-r--r-- | Objects/object.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Objects/object.c b/Objects/object.c index 83da6a4..e079d51 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -1459,7 +1459,7 @@ static PyNumberMethods none_as_number = { 0, /* nb_index */ }; -PyTypeObject PyNone_Type = { +PyTypeObject _PyNone_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "NoneType", 0, @@ -1502,7 +1502,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 @@ -1524,7 +1524,7 @@ notimplemented_new(PyTypeObject *type, PyObject *args, PyObject *kwargs) Py_RETURN_NOTIMPLEMENTED; } -PyTypeObject PyNotImplemented_Type = { +PyTypeObject _PyNotImplemented_Type = { PyVarObject_HEAD_INIT(&PyType_Type, 0) "NotImplementedType", 0, @@ -1567,7 +1567,7 @@ PyTypeObject PyNotImplemented_Type = { PyObject _Py_NotImplementedStruct = { _PyObject_EXTRA_INIT - 1, &PyNotImplemented_Type + 1, &_PyNotImplemented_Type }; void @@ -1597,10 +1597,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) |