diff Python/compile.c @ 336:64189ba7e23b legacy-trunk

Use dmore dict2lookup.
author Guido van Rossum <guido@python.org>
date Fri, 16 Aug 1991 08:58:43 +0000
parents 325b40d77235
children 31d509e94271
line wrap: on
line diff
--- a/Python/compile.c	Fri Aug 16 08:57:40 1991 +0000
+++ b/Python/compile.c	Fri Aug 16 08:58:43 1991 +0000
@@ -1950,10 +1950,13 @@
 			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;
+			}
 		}
 	}