All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] parse/ast: Mark anonymous functions as python functions
@ 2016-02-02 13:54 Richard Purdie
  0 siblings, 0 replies; only message in thread
From: Richard Purdie @ 2016-02-02 13:54 UTC (permalink / raw)
  To: bitbake-devel

Anonymous functions are python functions, set the variable
flags as such so we can detect them and avoid expansion where
needed.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index cff0d2b..1c5b9d1 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -156,8 +156,8 @@ class MethodNode(AstNode):
             anonfuncs = data.getVar('__BBANONFUNCS', False) or []
             anonfuncs.append(funcname)
             data.setVar('__BBANONFUNCS', anonfuncs)
-        else:
-            data.setVarFlag(self.func_name, "func", 1)
+            data.setVarFlag(funcname, "python", 1)
+        data.setVarFlag(funcname, "func", 1)
         data.setVar(funcname, text, parsing=True)
         data.setVarFlag(funcname, 'filename', self.filename)
         data.setVarFlag(funcname, 'lineno', str(self.lineno - len(self.body)))




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2016-02-02 13:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 13:54 [PATCH] parse/ast: Mark anonymous functions as python functions Richard Purdie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.