diff options
author | Skip Montanaro <skip@pobox.com> | 2002-09-03 20:10:45 (GMT) |
---|---|---|
committer | Skip Montanaro <skip@pobox.com> | 2002-09-03 20:10:45 (GMT) |
commit | d581d7792bc31e6249ee6ed20bc2a71f53f0d3bb (patch) | |
tree | 5dc5dd8a449fabd541a8f1050d49d7a381b60140 /Objects/longobject.c | |
parent | d229b3ae048ca51d9f3865e1e9eaf83ba5a6c424 (diff) | |
download | cpython-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 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 6 |
1 files changed, 2 insertions, 4 deletions
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 *muladd1(PyLongObject *, wdigit, wdigit); 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; } \ } |