comparison Python/errors.c @ 1912:ada19aaaf8c0 legacy-trunk

* Python/errors.c (err_clear): clear interpreter stack trace
author Guido van Rossum <guido@python.org>
date Thu, 29 Sep 1994 09:39:39 +0000
parents 79e420805c67
children a70883803338
comparison
equal deleted inserted replaced
1911:a7f269610ec2 1912:ada19aaaf8c0
54 scheme to a multi-threaded environment, only the implementation of 54 scheme to a multi-threaded environment, only the implementation of
55 err_setval() has to be changed. 55 err_setval() has to be changed.
56 */ 56 */
57 57
58 #include "allobjects.h" 58 #include "allobjects.h"
59 #include "modsupport.h" 59 #include "traceback.h"
60 60
61 #include <errno.h> 61 #include <errno.h>
62 62
63 extern char *strerror PROTO((int)); 63 extern char *strerror PROTO((int));
64 64
117 } 117 }
118 118
119 void 119 void
120 err_clear() 120 err_clear()
121 { 121 {
122 object *tb;
122 XDECREF(last_exception); 123 XDECREF(last_exception);
123 last_exception = NULL; 124 last_exception = NULL;
124 XDECREF(last_exc_val); 125 XDECREF(last_exc_val);
125 last_exc_val = NULL; 126 last_exc_val = NULL;
127 /* Also clear interpreter stack trace */
128 tb = tb_fetch();
129 XDECREF(tb);
126 } 130 }
127 131
128 /* Convenience functions to set a type error exception and return 0 */ 132 /* Convenience functions to set a type error exception and return 0 */
129 133
130 int 134 int