Skip to content
Prev Previous commit
Next Next commit
fix error checking
  • Loading branch information
kumaraditya303 authored Nov 4, 2022
commit bf02c241f6b14da51d14e91b651b9b49b69b1fa8
2 changes: 2 additions & 0 deletions Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3369,6 +3369,8 @@ slot_tp_del(PyObject *self)

PyObject *tp_del = PyUnicode_InternFromString("__tp_del__");
if (tp_del == NULL) {
PyErr_WriteUnraisable(NULL);
PyErr_Restore(error_type, error_value, error_traceback);
return;
}
Comment thread
kumaraditya303 marked this conversation as resolved.
/* Execute __del__ method, if any. */
Expand Down