From: W. Trevor King Date: Fri, 4 Mar 2011 02:36:27 +0000 (-0500) Subject: Normalize WTK_declare_lambda_function -> declare_lambda_function. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b584557fffaecaa88d786686b0ea8b6ef7408fe9;p=cython.git Normalize WTK_declare_lambda_function -> declare_lambda_function. --- diff --git a/Cython/Compiler/Nodes.py b/Cython/Compiler/Nodes.py index 8e18658e..04f570b3 100644 --- a/Cython/Compiler/Nodes.py +++ b/Cython/Compiler/Nodes.py @@ -2217,7 +2217,8 @@ class DefNode(FuncDefNode): prefix = env.scope_prefix func_cname = \ Naming.lambda_func_prefix + u'funcdef' + prefix + self.lambda_name - entry = env.declare_lambda_function(func_cname, self.pos) + binding = Binding(cname = func_cname) + entry = env.declare_lambda_function(binding, pos = self.pos) entry.pymethdef_cname = \ Naming.lambda_func_prefix + u'methdef' + prefix + self.lambda_name entry.qualified_name = env.qualify_name(self.lambda_name) diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index 16ec4938..90ecaa0c 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -636,12 +636,7 @@ class Scope(object): entry.is_anonymous = True return entry - def declare_lambda_function(self, func_cname, pos): - binding = self._WTK_setup(None, func_cname, 'private') - return self.WTK_declare_lambda_function(binding, pos) - - def WTK_declare_lambda_function(self, binding, - pos = None): + def declare_lambda_function(self, binding, pos = None): # Add an entry for an anonymous Python function. entry = self.WTK_declare_var(binding, py_object_type, pos = pos) entry.name = EncodedString(binding.cname)