aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-05-22 20:46:26 +0300
committerGitHub <noreply@github.com>2018-05-22 20:46:26 +0300
commit9ecd92c6fedd052f4115683726a5cc6ebaa33e85 (patch)
tree794a3df4990aa5397c7e284185b284bb956b6cb5 /mesonbuild/interpreter.py
parentf4194d4dbc5c48ff9a0d76c779876aab60754230 (diff)
parentfe6fc59ee75f44acdaac0abc757c687916d4618a (diff)
downloadmeson-9ecd92c6fedd052f4115683726a5cc6ebaa33e85.zip
meson-9ecd92c6fedd052f4115683726a5cc6ebaa33e85.tar.gz
meson-9ecd92c6fedd052f4115683726a5cc6ebaa33e85.tar.bz2
Merge pull request #3490 from MathieuDuponchelle/dict_builtin
Add new built-in type, dict
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 070845b..a63c143 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -45,6 +45,8 @@ permitted_method_kwargs = {
def stringifyUserArguments(args):
if isinstance(args, list):
return '[%s]' % ', '.join([stringifyUserArguments(x) for x in args])
+ elif isinstance(args, dict):
+ return '{%s}' % ', '.join(['%s : %s' % (stringifyUserArguments(k), stringifyUserArguments(v)) for k, v in args.items()])
elif isinstance(args, int):
return str(args)
elif isinstance(args, str):
@@ -2283,6 +2285,8 @@ to directly access options of other subprojects.''')
arg = posargs[0]
if isinstance(arg, list):
argstr = stringifyUserArguments(arg)
+ elif isinstance(arg, dict):
+ argstr = stringifyUserArguments(arg)
elif isinstance(arg, str):
argstr = arg
elif isinstance(arg, int):