summaryrefslogtreecommitdiff
path: root/Python/sysmodule.c
diff options
context:
space:
mode:
authorSkip Montanaro <skip@pobox.com>2002-09-03 20:10:45 +0000
committerSkip Montanaro <skip@pobox.com>2002-09-03 20:10:45 +0000
commit3e336c091fc1fee320c19d01ae2316791d65da6c (patch)
tree51a7892248add9813fba651cb752772b0b4c2193 /Python/sysmodule.c
parentb8bae30b5604536d02c9cc3191bd40b03a507181 (diff)
downloadcpython-3e336c091fc1fee320c19d01ae2316791d65da6c.tar.gz
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 cdacce3688..9057938dde 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;