aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2017-05-17 19:40:49 -0400
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2017-05-17 19:43:39 -0400
commit30645ed54b4e08611ae4883137d774a4c02b0278 (patch)
tree18c12c2a637bb4e3fc95ad690b4999be2b34529c /mesonbuild/interpreter.py
parentc69d82795ce543dbba0fc4fd50356628f7afc62d (diff)
downloadmeson-30645ed54b4e08611ae4883137d774a4c02b0278.zip
meson-30645ed54b4e08611ae4883137d774a4c02b0278.tar.gz
meson-30645ed54b4e08611ae4883137d774a4c02b0278.tar.bz2
Remove extra casts on InterpreterBase.evaluate_statement.
The result of this method is always a "native" object, and code coverage (plus a manual inspection) shows that this conversion is never done.
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 987e32b..948a6d4 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -2625,11 +2625,10 @@ different subdirectory.
raise InterpreterException('Tried to add non-existing source file %s.' % s)
def format_string(self, templ, args):
- templ = self.to_native(templ)
if isinstance(args, mparser.ArgumentNode):
args = args.arguments
for (i, arg) in enumerate(args):
- arg = self.to_native(self.evaluate_statement(arg))
+ arg = self.evaluate_statement(arg)
if isinstance(arg, bool): # Python boolean is upper case.
arg = str(arg).lower()
templ = templ.replace('@{}@'.format(i), str(arg))