From: Stefan Behnel Date: Tue, 1 Jun 2010 06:54:37 +0000 (+0200) Subject: temp var names in the TemplateTransform may become user visible, so they must be... X-Git-Tag: 0.13.beta0~57 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=836a678939e7560be453a69e0faddf02ae5a4656;p=cython.git temp var names in the TemplateTransform may become user visible, so they must be encoded as identifiers --- diff --git a/Cython/Compiler/TreeFragment.py b/Cython/Compiler/TreeFragment.py index 66feaf09..6da04ac9 100644 --- a/Cython/Compiler/TreeFragment.py +++ b/Cython/Compiler/TreeFragment.py @@ -14,6 +14,7 @@ from ExprNodes import NameNode import Parsing import Main import UtilNodes +import StringEncoding """ Support for parsing strings into code trees. @@ -120,7 +121,7 @@ class TemplateTransform(VisitorTransform): temphandles = [] for temp in temps: TemplateTransform.temp_name_counter += 1 - handle = "__tmpvar_%d" % TemplateTransform.temp_name_counter + handle = StringEncoding.EncodedString("__tmpvar_%d" % TemplateTransform.temp_name_counter) # handle = UtilNodes.TempHandle(PyrexTypes.py_object_type) tempmap[temp] = handle # temphandles.append(handle)