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>
This commit is contained in:
Richard Purdie 2016-02-02 13:54:37 +00:00
parent 9913fd88d9
commit 6ae662acdc
1 changed files with 2 additions and 2 deletions

View File

@ -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)))