summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-02 13:54:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-04 23:47:49 +0000
commit6ae662acdc145c541c3206717876beca1e563095 (patch)
tree21aed90892478c3aa9a2600fce3b1b55540760b2 /bitbake/lib/bb/parse
parent9913fd88d9399aedd58a39402673ba6aca28a118 (diff)
downloadpoky-6ae662acdc145c541c3206717876beca1e563095.tar.gz
bitbake: parse/ast: Mark anonymous functions as python functions
Anonymous functions are python functions, set the variable flags as such so we can detect them and avoid expansion where needed. (Bitbake rev: 1b303785c578bbae3a89be8d751d80fba860f62e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/parse')
-rw-r--r--bitbake/lib/bb/parse/ast.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 933a06e9bf..c676fc6bc8 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -156,8 +156,8 @@ class MethodNode(AstNode):
156 anonfuncs = data.getVar('__BBANONFUNCS', False) or [] 156 anonfuncs = data.getVar('__BBANONFUNCS', False) or []
157 anonfuncs.append(funcname) 157 anonfuncs.append(funcname)
158 data.setVar('__BBANONFUNCS', anonfuncs) 158 data.setVar('__BBANONFUNCS', anonfuncs)
159 else: 159 data.setVarFlag(funcname, "python", 1)
160 data.setVarFlag(self.func_name, "func", 1) 160 data.setVarFlag(funcname, "func", 1)
161 data.setVar(funcname, text, parsing=True) 161 data.setVar(funcname, text, parsing=True)
162 data.setVarFlag(funcname, 'filename', self.filename) 162 data.setVarFlag(funcname, 'filename', self.filename)
163 data.setVarFlag(funcname, 'lineno', str(self.lineno - len(self.body))) 163 data.setVarFlag(funcname, 'lineno', str(self.lineno - len(self.body)))