Kaydet (Commit) 5196c586 authored tarafından Neil Schemenauer's avatar Neil Schemenauer

- Fix a GC bug caused by PyDict_New() failing.

üst e3550a65
......@@ -2875,7 +2875,8 @@ Instance_New(PyObject *cls, PyObject *args) {
inst->in_class=(PyClassObject*)cls;
Py_INCREF(cls);
UNLESS (inst->in_dict=PyDict_New()) {
Py_DECREF(inst);
inst = (PyInstanceObject *) PyObject_AS_GC(inst);
PyObject_DEL(inst);
goto err;
}
PyObject_GC_Init(inst);
......
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