From: Guido van Rossum Date: Fri, 16 Aug 1991 08:58:43 +0000 (+0000) Subject: Use dmore dict2lookup. X-Git-Tag: v0.9.8~847 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=831632507a47eb5050d1f02fcb9f26aa1b1c6855;p=thirdparty%2FPython%2Fcpython.git Use dmore dict2lookup. --- diff --git a/Python/compile.c b/Python/compile.c index 4dc3d9f19a27..836633360bfb 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -1950,10 +1950,13 @@ optimizer(co) oparg = NEXTARG(); if (opcode == LOAD_NAME) { name = GETNAMEOBJ(oparg); - if (dictlookup(locals, getstringvalue(name)) != NULL) + if (dict2lookup(locals, name) != NULL) *cur_instr = LOAD_LOCAL; - else if (!star_used) - *cur_instr = LOAD_GLOBAL; + else { + err_clear(); + if (!star_used) + *cur_instr = LOAD_GLOBAL; + } } }