diff options
author | Mathieu Duponchelle <mathieu@centricular.com> | 2019-05-26 15:13:21 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-05-28 20:26:54 +0300 |
commit | 12a82e763d43f6280572b3f04357f77e50304855 (patch) | |
tree | a11ae68d4bd92ca1b84fae7cbc04b0cc238c1bc8 /docs/markdown/snippets | |
parent | 20eb948b974a96b3933d42db524fd584cb60c8b7 (diff) | |
download | meson-12a82e763d43f6280572b3f04357f77e50304855.zip meson-12a82e763d43f6280572b3f04357f77e50304855.tar.gz meson-12a82e763d43f6280572b3f04357f77e50304855.tar.bz2 |
interpreter: add fallback argument to subproject.get_variable()
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r-- | docs/markdown/snippets/add_fallback_argument_to_subproject_get_variable.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/add_fallback_argument_to_subproject_get_variable.md b/docs/markdown/snippets/add_fallback_argument_to_subproject_get_variable.md new file mode 100644 index 0000000..24dafa0 --- /dev/null +++ b/docs/markdown/snippets/add_fallback_argument_to_subproject_get_variable.md @@ -0,0 +1,13 @@ +--- +short-description: Add fallback argument to subproject.get_variable() +... + +## subproject.get_variable() now accepts a `fallback` argument + +Similar to `get_variable`, a fallback argument can now be passed to +`subproject.get_variable()`, it will be returned if the requested +variable name did not exist. + +``` meson +var = subproject.get_variable('does-not-exist', 'fallback-value') +``` |