Normalize WTK_declare_lambda_function -> declare_lambda_function.
authorW. Trevor King <wking@drexel.edu>
Fri, 4 Mar 2011 02:36:27 +0000 (21:36 -0500)
committerW. Trevor King <wking@drexel.edu>
Fri, 4 Mar 2011 02:36:27 +0000 (21:36 -0500)
Cython/Compiler/Nodes.py
Cython/Compiler/Symtab.py

index 8e18658e334605a3aefd800781fdd22a000c442a..04f570b3bb17d7a56e5a1eeca1a90fc7749347df 100644 (file)
@@ -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)
index 16ec4938bffab2809daa80b6f0c2685b8d5f51c5..90ecaa0c7847711a25de276d338d7c1ffdbfa84d 100644 (file)
@@ -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)