[Stackless-checkins] CVS: slpdev/src/2.3/dev/Stackless/core stackless_impl.h, 1.86, 1.87

Christian Tismer tismer at centera.de
Thu May 13 04:00:28 CEST 2004


Update of /home/cvs/slpdev/src/2.3/dev/Stackless/core
In directory centera.de:/tmp/cvs-serv30655/dev/Stackless/core

Modified Files:
	stackless_impl.h 
Log Message:
made bombs accessible to users and added to the comment.
The default return value of tasklet.run() is no longer the tasklet,
but is now untouched, in order to preserve a pre-set value like
a bomb.

Index: stackless_impl.h
===================================================================
RCS file: /home/cvs/slpdev/src/2.3/dev/Stackless/core/stackless_impl.h,v
retrieving revision 1.86
retrieving revision 1.87
diff -C2 -d -r1.86 -r1.87
*** stackless_impl.h	12 May 2004 15:33:56 -0000	1.86
--- stackless_impl.h	13 May 2004 02:00:26 -0000	1.87
***************
*** 347,351 ****
  					 int stackless);
  
! /* setting the tasklet's tempval */
  
  #define TASKLET_SETVAL(task, val) \
--- 347,351 ----
  					 int stackless);
  
! /* setting the tasklet's tempval, optimized for no change */
  
  #define TASKLET_SETVAL(task, val) \
***************
*** 357,371 ****
  	}
  
! /* ditto, without incref */
  
  #define TASKLET_SETVAL_OWN(task, val) \
! 	if ((task)->tempval != (PyObject *) val) { \
  		PyObject *hold = (task)->tempval; \
  		assert(val != NULL); \
  		(task)->tempval = (PyObject *) val; \
  		Py_DECREF(hold); \
! 	} \
! 	else \
! 		Py_DECREF(val);
  
  /* exchanging values with safety check */
--- 357,369 ----
  	}
  
! /* ditto, without incref. Made no sense to optimize. */
  
  #define TASKLET_SETVAL_OWN(task, val) \
! 	{ \
  		PyObject *hold = (task)->tempval; \
  		assert(val != NULL); \
  		(task)->tempval = (PyObject *) val; \
  		Py_DECREF(hold); \
! 	}
  
  /* exchanging values with safety check */


_______________________________________________
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