Kaydet (Commit) 226b1db0 authored tarafından Armin Ronacher's avatar Armin Ronacher

Added notimplemented_dealloc for better error reporting

üst dfc23974
......@@ -1524,12 +1524,21 @@ notimplemented_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
Py_RETURN_NOTIMPLEMENTED;
}
static void
notimplemented_dealloc(PyObject* ignore)
{
/* This should never get called, but we also don't want to SEGV if
* we accidentally decref NotImplemented out of existence.
*/
Py_FatalError("deallocating NotImplemented");
}
static PyTypeObject PyNotImplemented_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
"NotImplementedType",
0,
0,
none_dealloc, /*tp_dealloc*/ /*never called*/
notimplemented_dealloc, /*tp_dealloc*/ /*never called*/
0, /*tp_print*/
0, /*tp_getattr*/
0, /*tp_setattr*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment