diff options
author | Guido van Rossum <guido@python.org> | 1994-09-29 09:39:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1994-09-29 09:39:39 (GMT) |
commit | 6989e54ebf020ce9b3b2ecd327afa650e0e27995 (patch) | |
tree | a977e571780c757efa8880acb58e4c951be51a46 | |
parent | 83dd6c319e8c353b185038064e57282d8e396107 (diff) | |
download | cpython-6989e54ebf020ce9b3b2ecd327afa650e0e27995.zip cpython-6989e54ebf020ce9b3b2ecd327afa650e0e27995.tar.gz cpython-6989e54ebf020ce9b3b2ecd327afa650e0e27995.tar.bz2 |
* Python/errors.c (err_clear): clear interpreter stack trace
-rw-r--r-- | Python/errors.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 <errno.h> @@ -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 */ |