mirror of https://github.com/python/cpython.git
sysset(name, NULL) does nothing if sys.name is undefined
This commit is contained in:
parent
e0513dee58
commit
5ad58c6aef
|
@ -85,8 +85,12 @@ sysset(name, v)
|
|||
char *name;
|
||||
object *v;
|
||||
{
|
||||
if (v == NULL)
|
||||
return dictremove(sysdict, name);
|
||||
if (v == NULL) {
|
||||
if (dictlookup(sysdict, name) == NULL)
|
||||
return 0;
|
||||
else
|
||||
return dictremove(sysdict, name);
|
||||
}
|
||||
else
|
||||
return dictinsert(sysdict, name, v);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue