[Stackless-checkins] CVS: slpdev/src/2.3/dev/Modules cPickle.c, 1.12, 1.13

Christian Tismer tismer at centera.de
Sat May 1 22:27:43 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Modules
In directory centera.de:/tmp/cvs-serv27679/Modules

Modified Files:
	cPickle.c 
Log Message:
simplified modict pickling, to make it easier to port to 2.2.3

Index: cPickle.c
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Modules/cPickle.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** cPickle.c	29 Apr 2004 17:58:58 -0000	1.12
--- cPickle.c	1 May 2004 20:27:41 -0000	1.13
***************
*** 1734,1751 ****
  	PyObject *iter;
  
- #ifdef STACKLESS
- 	{
- 		static int
- 		save_reduce(Picklerobject *self, PyObject *args, PyObject *ob);
- 		PyObject *ret = PyStackless_Pickle_ModuleDict((PyObject *) self, args);
- 		if (ret == NULL) return -1;
- 		if (ret != Py_None) {
- 			res = save_reduce(self, ret, args);
- 			Py_DECREF(ret);
- 			return res;
- 		}
- 		Py_DECREF(ret);
- 	}
- #endif
  	if (self->fast && !fast_save_enter(self, args))
  		goto finally;
--- 1734,1737 ----
***************
*** 2422,2425 ****
--- 2408,2423 ----
          case 'd':
  		if (type == &PyDict_Type) {
+ #ifdef STACKLESS
+ 			PyObject *ret = PyStackless_Pickle_ModuleDict(
+ 					    (PyObject *) self, args);
+ 			
+ 			if (ret == NULL) return -1;
+ 			if (ret != Py_None) {
+ 				res = save_reduce(self, ret, args);
+ 				Py_DECREF(ret);
+ 				goto finally;
+ 			}
+ 			Py_DECREF(ret);
+ #endif
  			res = save_dict(self, args);
  			goto finally;


_______________________________________________
Stackless-checkins mailing list
Stackless-checkins at stackless.com
http://www.stackless.com/mailman/listinfo/stackless-checkins



More information about the Stackless-checkins mailing list