diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-02 13:54:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-02-04 23:47:43 +0000 |
commit | 1b303785c578bbae3a89be8d751d80fba860f62e (patch) | |
tree | 51131507bb4092158e357e3caabbed1816d8289c /lib/bb/parse/ast.py | |
parent | b12c17be5e4a74c9680876605c87f46501f78d28 (diff) | |
download | bitbake-1b303785c578bbae3a89be8d751d80fba860f62e.tar.gz |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/parse/ast.py')
-rw-r--r-- | lib/bb/parse/ast.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/bb/parse/ast.py b/lib/bb/parse/ast.py index 933a06e9b..c676fc6bc 100644 --- a/lib/bb/parse/ast.py +++ b/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))) |