mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Correct typo in setattr: return -1 for error, not NULL
This commit is contained in:
parent
e1607a8d0e
commit
b7fc304109
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue