mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +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;
|
||||
s = newstringobject(name);
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
return -1;
|
||||
res = (*v->ob_type->tp_setattro)(v, s, w);
|
||||
XDECREF(s);
|
||||
return res;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue