summaryrefslogtreecommitdiffstats
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-09-03 20:10:45 (GMT)
committerSkip Montanaro <skip@pobox.com>2002-09-03 20:10:45 (GMT)
commitd581d7792bc31e6249ee6ed20bc2a71f53f0d3bb (patch)
tree5dc5dd8a449fabd541a8f1050d49d7a381b60140 /Python/sysmodule.c
parentd229b3ae048ca51d9f3865e1e9eaf83ba5a6c424 (diff)
downloadcpython-d581d7792bc31e6249ee6ed20bc2a71f53f0d3bb.zip
cpython-d581d7792bc31e6249ee6ed20bc2a71f53f0d3bb.tar.gz
cpython-d581d7792bc31e6249ee6ed20bc2a71f53f0d3bb.tar.bz2
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
Diffstat (limited to 'Python/sysmodule.c')
-rw-r--r--Python/sysmodule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/Python/sysmodule.c b/Python/sysmodule.c
index cdacce3..9057938 100644
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -352,8 +352,7 @@ and return. See the profiler chapter in the library manual."
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;