sysset(name, NULL) does nothing if sys.name is undefined

This commit is contained in:
Guido van Rossum 1992-01-26 18:15:48 +00:00
parent e0513dee58
commit 5ad58c6aef
1 changed files with 6 additions and 2 deletions

View File

@ -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);
}