mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
sysset(name, NULL) does nothing if sys.name is undefined
This commit is contained in:
parent
e0513dee58
commit
5ad58c6aef
1 changed files with 6 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue