diff Python/import.c @ 340:e3941efd7310 legacy-trunk

Use more dict2 functions./
author Guido van Rossum <guido@python.org>
date Fri, 16 Aug 1991 09:01:08 +0000
parents f900b692b37e
children 77b80a91d357
line wrap: on
line diff
--- a/Python/import.c	Fri Aug 16 09:00:42 1991 +0000
+++ b/Python/import.c	Fri Aug 16 09:01:08 1991 +0000
@@ -287,12 +287,14 @@
 		/* 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)) {