refactor __del__ exception handler into PyErr_WriteUnraisable

add sanity check to gc: if an exception occurs during GC, call
PyErr_WriteUnraisable and then call Py_FatalEror.
This commit is contained in:
Jeremy Hylton 2000-09-01 02:47:25 +00:00
parent b9ce5ada37
commit b709df3810
5 changed files with 50 additions and 21 deletions

View file

@ -92,6 +92,7 @@ extern DL_IMPORT(void) _PyErr_BadInternalCall(char *filename, int lineno);
/* Function to create a new exception */
DL_IMPORT(PyObject *) PyErr_NewException(char *name, PyObject *base,
PyObject *dict);
extern DL_IMPORT(void) PyErr_WriteUnraisable(PyObject *);
/* In sigcheck.c or signalmodule.c */
extern DL_IMPORT(int) PyErr_CheckSignals(void);