[Python-checkins] CVS: python/dist/src/Modules cPickle.c,2.59,2.59.4.1

Guido van Rossum gvanrossum@users.sourceforge.net
Sat, 16 Jun 2001 07:34:15 -0700


Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv8861

Modified Files:
      Tag: descr-branch
	cPickle.c 
Log Message:
Make type objects picklable.  They are pickled as globals.  This isn't
always right, but works for the important cases.


Index: cPickle.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/cPickle.c,v
retrieving revision 2.59
retrieving revision 2.59.4.1
diff -C2 -r2.59 -r2.59.4.1
*** cPickle.c	2001/04/10 04:35:28	2.59
--- cPickle.c	2001/06/16 14:34:13	2.59.4.1
***************
*** 1872,1875 ****
--- 1872,1879 ----
                  goto finally;
              }
+ 	    if (type == &PyType_Type) {
+ 		res = save_global(self, args, NULL);
+ 		goto finally;
+ 	    }
              break;