comparison 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
comparison
equal deleted inserted replaced
25107:0ecb3cabf40b 25108:3a26e352f0a6
350 ); 350 );
351 351
352 static PyObject * 352 static PyObject *
353 sys_setcheckinterval(PyObject *self, PyObject *args) 353 sys_setcheckinterval(PyObject *self, PyObject *args)
354 { 354 {
355 PyThreadState *tstate = PyThreadState_Get(); 355 if (!PyArg_ParseTuple(args, "i:setcheckinterval", &_Py_CheckInterval))
356 if (!PyArg_ParseTuple(args, "i:setcheckinterval", &tstate->interp->checkinterval))
357 return NULL; 356 return NULL;
358 Py_INCREF(Py_None); 357 Py_INCREF(Py_None);
359 return Py_None; 358 return Py_None;
360 } 359 }
361 360