mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
Use more dict2 functions./
This commit is contained in:
parent
4b3c1da660
commit
f0ada4a130
1 changed files with 6 additions and 4 deletions
|
@ -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)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue