Kaydet (Commit) b7fc3041 authored tarafından Guido van Rossum's avatar Guido van Rossum

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

üst e1607a8d
...@@ -370,7 +370,7 @@ setattr(v, name, w) ...@@ -370,7 +370,7 @@ setattr(v, name, w)
int res; int res;
s = newstringobject(name); s = newstringobject(name);
if (s == NULL) if (s == NULL)
return NULL; return -1;
res = (*v->ob_type->tp_setattro)(v, s, w); res = (*v->ob_type->tp_setattro)(v, s, w);
XDECREF(s); XDECREF(s);
return res; return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment