diff options
author | Guido van Rossum <guido@python.org> | 1991-08-16 09:01:08 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1991-08-16 09:01:08 (GMT) |
commit | f0ada4a130c24a5b10b02f3b51ee0b7cd632cb4b (patch) | |
tree | e46a095eccb0bff6896f5ce890d14277e64c6580 /Python | |
parent | 4b3c1da6607639c254ced318497eb1dbb585b85a (diff) | |
download | cpython-f0ada4a130c24a5b10b02f3b51ee0b7cd632cb4b.zip cpython-f0ada4a130c24a5b10b02f3b51ee0b7cd632cb4b.tar.gz cpython-f0ada4a130c24a5b10b02f3b51ee0b7cd632cb4b.tar.bz2 |
Use more dict2 functions./
Diffstat (limited to 'Python')
-rw-r--r-- | Python/import.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c index f62d1d2..ab08be5 100644 --- a/Python/import.c +++ b/Python/import.c @@ -287,12 +287,14 @@ doneimport() /* Explicitly erase all modules; this is the safest way to get rid of at least *some* circular dependencies */ for (i = getdictsize(modules); --i >= 0; ) { - char *k; - k = getdictkey(modules, i); + object *k; + k = getdict2key(modules, i); if (k != NULL) { object *m; - m = dictlookup(modules, k); - if (m != NULL && is_moduleobject(m)) { + m = dict2lookup(modules, k); + if (m == NULL) + err_clear(); + else if (is_moduleobject(m)) { object *d; d = getmoduledict(m); if (d != NULL && is_dictobject(d)) { |