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

This commit is contained in:
Neil Schemenauer 2000-10-04 16:22:26 +00:00
parent e3550a65eb
commit 5196c586bb
1 changed files with 2 additions and 1 deletions

View File

@ -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);