Issue #6477: Keep PyNotImplemented_Type and PyNone_Type private.
diff --git a/Modules/_pickle.c b/Modules/_pickle.c
index ba192fb..ae801f7 100644
--- a/Modules/_pickle.c
+++ b/Modules/_pickle.c
@@ -2853,13 +2853,13 @@
 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);