summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-01-23 21:11:58 +0000
committerMartin v. Löwis <martin@v.loewis.de>2007-01-23 21:11:58 +0000
commit601d03a5be6a6952ecb57750f0365d6ef2abd4eb (patch)
treede7a636892d4b0cf10d818665498b23184d30ae4 /Python
parente471317a084512d558fd3bfd84592a6a7126cdee (diff)
downloadcpython-git-601d03a5be6a6952ecb57750f0365d6ef2abd4eb.tar.gz
Make PyTraceBack_Here use the current thread, not the
frame's thread state. Fixes #1579370.
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 cfbd83361f..4ddee2c73b 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)