[Python-checkins] python/dist/src/Python compile.c,2.356,2.357

nascheme@users.sourceforge.net nascheme at users.sourceforge.net
Sun Oct 23 06:24:53 CEST 2005


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28480/Python

Modified Files:
	compile.c 
Log Message:
Fix arigo's funky LOAD_NAME bug: implicit globals inside classes have
historically been looked up using LOAD_NAME, not LOAD_GLOBAL.
looked up by LOAD_NAME, not


Index: compile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/compile.c,v
retrieving revision 2.356
retrieving revision 2.357
diff -u -d -r2.356 -r2.357
--- compile.c	23 Oct 2005 03:45:42 -0000	2.356
+++ compile.c	23 Oct 2005 04:24:49 -0000	2.357
@@ -2731,7 +2731,8 @@
 			optype = OP_FAST;
 		break;
 	case GLOBAL_IMPLICIT:
-		if (!c->u->u_ste->ste_unoptimized)
+		if (c->u->u_ste->ste_type == FunctionBlock &&
+			!c->u->u_ste->ste_unoptimized)
 			optype = OP_GLOBAL;
 		break;
 	case GLOBAL_EXPLICIT:



More information about the Python-checkins mailing list