From b584557fffaecaa88d786686b0ea8b6ef7408fe9 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 3 Mar 2011 21:36:27 -0500 Subject: [PATCH] Normalize WTK_declare_lambda_function -> declare_lambda_function. --- Cython/Compiler/Nodes.py | 3 ++- Cython/Compiler/Symtab.py | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) 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) -- 2.26.2