merge 3.2

This commit is contained in:
Benjamin Peterson 2011-08-16 22:27:42 -05:00
commit 3e6267e704

View file

@ -2091,8 +2091,10 @@ type_new(PyTypeObject *metatype, PyObject *args, PyObject *kwds)
PyUnicode_CompareWithASCIIString(tmp, "__weakref__") == 0))
continue;
tmp =_Py_Mangle(name, tmp);
if (!tmp)
if (!tmp) {
Py_DECREF(newslots);
goto bad_slots;
}
PyList_SET_ITEM(newslots, j, tmp);
if (PyDict_GetItem(dict, tmp)) {
PyErr_Format(PyExc_ValueError,