Correct typo in setattr: return -1 for error, not NULL

This commit is contained in:
Guido van Rossum 1996-09-11 22:51:25 +00:00
parent e1607a8d0e
commit b7fc304109

View File

@ -370,7 +370,7 @@ setattr(v, name, w)
int res;
s = newstringobject(name);
if (s == NULL)
return NULL;
return -1;
res = (*v->ob_type->tp_setattro)(v, s, w);
XDECREF(s);
return res;