From 6989e54ebf020ce9b3b2ecd327afa650e0e27995 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 29 Sep 1994 09:39:39 +0000 Subject: * Python/errors.c (err_clear): clear interpreter stack trace --- Python/errors.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Python/errors.c b/Python/errors.c index f339bbf..7266eca 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -56,7 +56,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #include "allobjects.h" -#include "modsupport.h" +#include "traceback.h" #include @@ -119,10 +119,14 @@ err_get(p_exc, p_val) void err_clear() { + object *tb; XDECREF(last_exception); last_exception = NULL; XDECREF(last_exc_val); last_exc_val = NULL; + /* Also clear interpreter stack trace */ + tb = tb_fetch(); + XDECREF(tb); } /* Convenience functions to set a type error exception and return 0 */ -- cgit v0.12