From: Dag Sverre Seljebotn Date: Thu, 19 Jun 2008 02:18:10 +0000 (-0700) Subject: Fixed typos, using Naming for temp prefixes X-Git-Tag: 0.9.8.1~49^2~122 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=ff81f222d195a1235c91a143958f3e91797c604e;p=cython.git Fixed typos, using Naming for temp prefixes --- diff --git a/Cython/Compiler/Naming.py b/Cython/Compiler/Naming.py index 3b89f757..4598e5b7 100644 --- a/Cython/Compiler/Naming.py +++ b/Cython/Compiler/Naming.py @@ -8,7 +8,7 @@ pyrex_prefix = "__pyx_" -temp_prefix = "__pyxtmp_" +temp_prefix = u"__cyt_" builtin_prefix = pyrex_prefix + "builtin_" arg_prefix = pyrex_prefix + "arg_" diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index c985e0d1..3541e67e 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -3330,17 +3330,19 @@ class ExceptClauseNode(Node): # target ExprNode or None # body StatNode # excinfo_target NameNode or None optional target for exception info - # excinfo_target NameNode or None used internally # match_flag string result of exception match # exc_value ExcValueNode used internally # function_name string qualified name of enclosing function # exc_vars (string * 3) local exception variables + + # excinfo_target is never set by the parser, but can be set by a transform + # in order to extract more extensive information about the exception as a + # sys.exc_info()-style tuple into a target variable child_attrs = ["pattern", "target", "body", "exc_value", "excinfo_target"] exc_value = None excinfo_target = None - excinfo_assignment = None def analyse_declarations(self, env): if self.target: diff --git a/Cython/Compiler/Visitor.py b/Cython/Compiler/Visitor.py index 7dcfcf2d..0f9623d2 100644 --- a/Cython/Compiler/Visitor.py +++ b/Cython/Compiler/Visitor.py @@ -1,9 +1,10 @@ # # Tree visitor and transform framework # +import inspect import Nodes import ExprNodes -import inspect +import Naming from Cython.Utils import EncodedString class BasicVisitor(object): @@ -171,7 +172,7 @@ tmpnamectr = 0 def temp_name_handle(description): global tmpnamectr tmpnamectr += 1 - return EncodedString(u"__cyt_%d_%s" % (tmpnamectr, description)) + return EncodedString(Naming.temp_prefix + u"%d_%s" % (tmpnamectr, description)) def get_temp_name_handle_desc(handle): if not handle.startswith(u"__cyt_"):