[Stackless-checkins] r55043 - in stackless/branches/release25-maint/Stackless: module/channelobject.c module/channelobject.h pickling/prickelpit.c

richard.tew python-checkins at python.org
Tue May 1 12:25:52 CEST 2007


Author: richard.tew
Date: Tue May  1 12:25:50 2007
New Revision: 55043

Modified:
   stackless/branches/release25-maint/Stackless/module/channelobject.c
   stackless/branches/release25-maint/Stackless/module/channelobject.h
   stackless/branches/release25-maint/Stackless/pickling/prickelpit.c
Log:
Allow the channel send sequence method to be pickled.  This involved hooking the frame pickling used for the eval_frame functions up to be used for the cframe used by channel_send_sequence.  Was a little unsure about this change, but Christian gave it an ok when I passed it by him.

Modified: stackless/branches/release25-maint/Stackless/module/channelobject.c
==============================================================================
--- stackless/branches/release25-maint/Stackless/module/channelobject.c	(original)
+++ stackless/branches/release25-maint/Stackless/module/channelobject.c	Tue May  1 12:25:50 2007
@@ -745,7 +745,7 @@
  * the loop all the time. Hopefully the idea is still visible.
  */
 
-static PyObject *
+PyObject *
 channel_seq_callback(PyFrameObject *_f, int exc, PyObject *retval)
 {
 	PyThreadState *ts;

Modified: stackless/branches/release25-maint/Stackless/module/channelobject.h
==============================================================================
--- stackless/branches/release25-maint/Stackless/module/channelobject.h	(original)
+++ stackless/branches/release25-maint/Stackless/module/channelobject.h	Tue May  1 12:25:50 2007
@@ -17,3 +17,6 @@
 } PyChannel_HeapType;
 
 int init_channeltype(void);
+
+PyObject * channel_seq_callback(struct _frame *f,  int throwflag,
+					     PyObject *retval);

Modified: stackless/branches/release25-maint/Stackless/pickling/prickelpit.c
==============================================================================
--- stackless/branches/release25-maint/Stackless/pickling/prickelpit.c	(original)
+++ stackless/branches/release25-maint/Stackless/pickling/prickelpit.c	Tue May  1 12:25:50 2007
@@ -5,6 +5,7 @@
 
 #include "core/stackless_impl.h"
 #include "pickling/prickelpit.h"
+#include "module/channelobject.h"
 
 /* platform specific constants */
 #include "platf/slp_platformselect.h"
@@ -719,6 +720,7 @@
 DEF_INVALID_EXEC(eval_frame_value)
 DEF_INVALID_EXEC(eval_frame_noval)
 DEF_INVALID_EXEC(eval_frame_iter)
+DEF_INVALID_EXEC(channel_seq_callback)
 
 static PyTypeObject wrap_PyFrame_Type;
 
@@ -1048,6 +1050,8 @@
 				 PyEval_EvalFrame_noval, REF_INVALID_EXEC(eval_frame_noval))
 	    || slp_register_execute(&PyFrame_Type, "eval_frame_iter",
 				 PyEval_EvalFrame_iter, REF_INVALID_EXEC(eval_frame_iter))
+	    || slp_register_execute(&PyCFrame_Type, "channel_seq_callback",
+				 channel_seq_callback, REF_INVALID_EXEC(channel_seq_callback))
 	    || init_type(&wrap_PyFrame_Type, initchain);
 }
 #undef initchain

_______________________________________________
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