[Python-checkins] python/dist/src/Include pystate.h,2.19,2.20 ceval.h,2.45,2.46

montanaro@users.sourceforge.net montanaro@users.sourceforge.net
Tue, 03 Sep 2002 13:10:46 -0700


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

Modified Files:
	pystate.h ceval.h 
Log Message:
replace thread state objects' ticker and checkinterval fields with two
globals, _Py_Ticker and _Py_CheckInterval.  This also implements Jeremy's
shortcut in Py_AddPendingCall that zeroes out _Py_Ticker.  This allows the
test in the main loop to only test a single value.

The gory details are at

    http://python.org/sf/602191



Index: pystate.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/pystate.h,v
retrieving revision 2.19
retrieving revision 2.20
diff -C2 -d -r2.19 -r2.20
*** pystate.h	12 Aug 2002 07:21:57 -0000	2.19
--- pystate.h	3 Sep 2002 20:10:44 -0000	2.20
***************
*** 23,27 ****
      PyObject *builtins;
  
-     int checkinterval;
  #ifdef HAVE_DLOPEN
      int dlopenflags;
--- 23,26 ----
***************
*** 51,55 ****
      struct _frame *frame;
      int recursion_depth;
-     int ticker;
      int tracing;
      int use_tracing;
--- 50,53 ----

Index: ceval.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/ceval.h,v
retrieving revision 2.45
retrieving revision 2.46
diff -C2 -d -r2.45 -r2.46
*** ceval.h	12 Aug 2002 07:21:56 -0000	2.45
--- ceval.h	3 Sep 2002 20:10:44 -0000	2.46
***************
*** 49,52 ****
--- 49,56 ----
  PyAPI_FUNC(char *) PyEval_GetFuncDesc(PyObject *);
  
+ /* this used to be handled on a per-thread basis - now just two globals */
+ PyAPI_DATA(volatile int) _Py_Ticker;
+ PyAPI_DATA(int) _Py_CheckInterval;
+ 
  /* Interface for threads.