diff Python/traceback.c @ 40703:df294bc5ce6e legacy-trunk

Make PyTraceBack_Here use the current thread, not the frame's thread state. Fixes #1579370. Will backport.
author Martin v. Löwis <martin@v.loewis.de>
date Tue, 23 Jan 2007 21:11:47 +0000
parents 7b2e436a4a21
children 6620a510e9a9
line wrap: on
line diff
--- a/Python/traceback.c	Tue Jan 23 13:50:49 2007 +0000
+++ b/Python/traceback.c	Tue Jan 23 21:11:47 2007 +0000
@@ -113,7 +113,7 @@
 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)