summaryrefslogtreecommitdiffstats
path: root/Modules/cPickle.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/cPickle.c')
-rw-r--r--Modules/cPickle.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/cPickle.c b/Modules/cPickle.c
index 425ff10..a4943ce 100644
--- a/Modules/cPickle.c
+++ b/Modules/cPickle.c
@@ -1990,6 +1990,11 @@ save(Picklerobject *self, PyObject *args, int pers_save) {
}
}
+ if (PyType_IsSubtype(type, &PyType_Type)) {
+ res = save_global(self, args, NULL);
+ goto finally;
+ }
+
if (!pers_save && self->inst_pers_func) {
if ((tmp = save_pers(self, args, self->inst_pers_func)) != 0) {
res = tmp;