diff Python/sysmodule.c @ 25108:3a26e352f0a6 legacy-trunk

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
author Skip Montanaro <skip@pobox.com>
date Tue, 03 Sep 2002 20:10:45 +0000
parents a69a12484d69
children 4a825b902310
line wrap: on
line diff
--- a/Python/sysmodule.c	Tue Sep 03 19:24:24 2002 +0000
+++ b/Python/sysmodule.c	Tue Sep 03 20:10:45 2002 +0000
@@ -352,8 +352,7 @@
 static PyObject *
 sys_setcheckinterval(PyObject *self, PyObject *args)
 {
-	PyThreadState *tstate = PyThreadState_Get();
-	if (!PyArg_ParseTuple(args, "i:setcheckinterval", &tstate->interp->checkinterval))
+	if (!PyArg_ParseTuple(args, "i:setcheckinterval", &_Py_CheckInterval))
 		return NULL;
 	Py_INCREF(Py_None);
 	return Py_None;