[Python-checkins] python/dist/src/Modules cPickle.c,2.88,2.89
jhylton@users.sourceforge.net
jhylton@users.sourceforge.net
Tue, 16 Jul 2002 12:47:45 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv20531/Modules
Modified Files:
cPickle.c
Log Message:
Given the persistent id code a shot at a class before calling save_global().
Some persistent picklers (well, probably, the *only* persistent
pickler) would like to pickle some classes in a special way.
Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.88
retrieving revision 2.89
diff -C2 -d -r2.88 -r2.89
*** cPickle.c 11 Jul 2002 22:02:33 -0000 2.88
--- cPickle.c 16 Jul 2002 19:47:43 -0000 2.89
***************
*** 2016,2024 ****
}
- 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) {
--- 2016,2019 ----
***************
*** 2026,2029 ****
--- 2021,2029 ----
goto finally;
}
+ }
+
+ if (PyType_IsSubtype(type, &PyType_Type)) {
+ res = save_global(self, args, NULL);
+ goto finally;
}