]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use more dict2 functions./
authorGuido van Rossum <guido@python.org>
Fri, 16 Aug 1991 09:01:08 +0000 (09:01 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 16 Aug 1991 09:01:08 +0000 (09:01 +0000)
Python/import.c

index f62d1d266a1eafa2f90a6b43256b195722619014..ab08be5053e8262902c47621b5026de11219ef76 100644 (file)
@@ -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)) {