summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-01-23 21:11:47 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-01-23 21:11:47 (GMT)
commit6c5c502b914261ba333e98c4657a8d90cfbbe872 (patch)
treeebb0e2f7e26e24d54acf7889a7a7f5ce217edf6c /Python
parent6ed196530865eee2fed5548a5d9a0b0384c6a815 (diff)
downloadcpython-6c5c502b914261ba333e98c4657a8d90cfbbe872.zip
cpython-6c5c502b914261ba333e98c4657a8d90cfbbe872.tar.gz
cpython-6c5c502b914261ba333e98c4657a8d90cfbbe872.tar.bz2
Make PyTraceBack_Here use the current thread, not the
frame's thread state. Fixes #1579370. Will backport.
Diffstat (limited to 'Python')
-rw-r--r--Python/traceback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/traceback.c b/Python/traceback.c
index cfbd833..4ddee2c 100644
--- a/Python/traceback.c
+++ b/Python/traceback.c
@@ -113,7 +113,7 @@ newtracebackobject(PyTracebackObject *next, PyFrameObject *frame)
int
PyTraceBack_Here(PyFrameObject *frame)
{
- PyThreadState *tstate = frame->f_tstate;
+ PyThreadState *tstate = PyThreadState_GET();
PyTracebackObject *oldtb = (PyTracebackObject *) tstate->curexc_traceback;
PyTracebackObject *tb = newtracebackobject(oldtb, frame);
if (tb == NULL)