merge 3.2 (closes #13908)

This commit is contained in:
Benjamin Peterson 2012-01-29 20:17:07 -05:00
commit 2372bb0722
2 changed files with 7 additions and 1 deletions

View file

@ -2394,7 +2394,8 @@ static short slotoffsets[] = {
#include "typeslots.inc"
};
PyObject* PyType_FromSpec(PyType_Spec *spec)
PyObject *
PyType_FromSpec(PyType_Spec *spec)
{
PyHeapTypeObject *res = (PyHeapTypeObject*)PyType_GenericAlloc(&PyType_Type, 0);
char *res_start = (char*)res;
@ -2434,6 +2435,9 @@ PyObject* PyType_FromSpec(PyType_Spec *spec)
}
}
if (PyType_Ready(&res->ht_type) < 0)
goto fail;
return (PyObject*)res;
fail: