(pedronis, arigo)

segfault when a class contain a non-list value in the (undocumented)
special attribute __slotnames__.
This commit is contained in:
Armin Rigo 2005-09-24 22:58:41 +00:00
parent 6b27cda643
commit ec862b907a
1 changed files with 1 additions and 1 deletions

View File

@ -2522,7 +2522,7 @@ slotnames(PyObject *cls)
clsdict = ((PyTypeObject *)cls)->tp_dict;
slotnames = PyDict_GetItemString(clsdict, "__slotnames__");
if (slotnames != NULL) {
if (slotnames != NULL && PyList_Check(slotnames)) {
Py_INCREF(slotnames);
return slotnames;
}