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
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 9e641af..35d1211 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -28,11 +28,9 @@
static PyLongObject *divrem1(PyLongObject *, digit, digit *);
static PyObject *long_format(PyObject *aa, int base, int addL);
-static int ticker; /* XXX Could be shared with ceval? */
-
#define SIGCHECK(PyTryBlock) \
- if (--ticker < 0) { \
- ticker = 100; \
+ if (--_Py_Ticker < 0) { \
+ _Py_Ticker = _Py_CheckInterval; \
if (PyErr_CheckSignals()) { PyTryBlock; } \
}