Skip to content

Commit 223e143

Browse files
Revert type name changes
1 parent b915f06 commit 223e143

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

Modules/_pickle.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,8 @@ typedef struct {
194194
PyObject *partial;
195195

196196
/* Types */
197-
PyTypeObject *pickler_type;
198-
PyTypeObject *unpickler_type;
197+
PyTypeObject *Pickler_Type;
198+
PyTypeObject *Unpickler_Type;
199199
PyTypeObject *Pdata_type;
200200
PyTypeObject *PicklerMemoProxyType;
201201
PyTypeObject *UnpicklerMemoProxyType;
@@ -247,8 +247,8 @@ _Pickle_ClearState(PickleState *st)
247247
Py_CLEAR(st->codecs_encode);
248248
Py_CLEAR(st->getattr);
249249
Py_CLEAR(st->partial);
250-
Py_CLEAR(st->pickler_type);
251-
Py_CLEAR(st->unpickler_type);
250+
Py_CLEAR(st->Pickler_Type);
251+
Py_CLEAR(st->Unpickler_Type);
252252
Py_CLEAR(st->Pdata_type);
253253
Py_CLEAR(st->PicklerMemoProxyType);
254254
Py_CLEAR(st->UnpicklerMemoProxyType);
@@ -1147,7 +1147,7 @@ _Pickler_New(PickleState *st)
11471147
{
11481148
PicklerObject *self;
11491149

1150-
self = PyObject_GC_New(PicklerObject, st->pickler_type);
1150+
self = PyObject_GC_New(PicklerObject, st->Pickler_Type);
11511151
if (self == NULL)
11521152
return NULL;
11531153

@@ -1628,7 +1628,7 @@ _Unpickler_New(PyObject *module)
16281628
UnpicklerObject *self;
16291629
PickleState *st = _Pickle_GetState(module);
16301630

1631-
self = PyObject_GC_New(UnpicklerObject, st->unpickler_type);
1631+
self = PyObject_GC_New(UnpicklerObject, st->Unpickler_Type);
16321632
if (self == NULL)
16331633
return NULL;
16341634

@@ -7838,8 +7838,8 @@ pickle_traverse(PyObject *m, visitproc visit, void *arg)
78387838
Py_VISIT(st->codecs_encode);
78397839
Py_VISIT(st->getattr);
78407840
Py_VISIT(st->partial);
7841-
Py_VISIT(st->pickler_type);
7842-
Py_VISIT(st->unpickler_type);
7841+
Py_VISIT(st->Pickler_Type);
7842+
Py_VISIT(st->Unpickler_Type);
78437843
Py_VISIT(st->Pdata_type);
78447844
Py_VISIT(st->PicklerMemoProxyType);
78457845
Py_VISIT(st->UnpicklerMemoProxyType);
@@ -7874,21 +7874,21 @@ _pickle_exec(PyObject *m)
78747874
return -1;
78757875
}
78767876

7877-
st->pickler_type = (PyTypeObject *)PyType_FromModuleAndSpec(m, &pickler_type_spec, NULL);
7878-
if (st->pickler_type == NULL) {
7877+
st->Pickler_Type = (PyTypeObject *)PyType_FromModuleAndSpec(m, &pickler_type_spec, NULL);
7878+
if (st->Pickler_Type == NULL) {
78797879
return -1;
78807880
}
78817881

7882-
if (PyModule_AddType(m, st->pickler_type) < 0) {
7882+
if (PyModule_AddType(m, st->Pickler_Type) < 0) {
78837883
return -1;
78847884
}
78857885

7886-
st->unpickler_type = (PyTypeObject *)PyType_FromModuleAndSpec(m, &unpickler_type_spec, NULL);
7887-
if (st->unpickler_type == NULL) {
7886+
st->Unpickler_Type = (PyTypeObject *)PyType_FromModuleAndSpec(m, &unpickler_type_spec, NULL);
7887+
if (st->Unpickler_Type == NULL) {
78887888
return -1;
78897889
}
78907890

7891-
if (PyModule_AddType(m, st->unpickler_type) < 0) {
7891+
if (PyModule_AddType(m, st->Unpickler_Type) < 0) {
78927892
return -1;
78937893
}
78947894

0 commit comments

Comments
 (0)