aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/optinterpreter.py
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2016-03-19 17:57:11 +0000
committerTim-Philipp Müller <tim@centricular.com>2016-03-19 17:57:11 +0000
commit3eea1703ffb7559cc7d7454ced119aa45c167c9f (patch)
treec122e871e6db75250f0d4ad776cdfe3989e8ed27 /mesonbuild/optinterpreter.py
parentdc049660e7d5e7c4b4a9ded4acb02fe90860adfb (diff)
downloadmeson-3eea1703ffb7559cc7d7454ced119aa45c167c9f.zip
meson-3eea1703ffb7559cc7d7454ced119aa45c167c9f.tar.gz
meson-3eea1703ffb7559cc7d7454ced119aa45c167c9f.tar.bz2
Add bool to_string() and to_int() methods
bool to_int() will return 0 or 1, useful if one wants to set a define to 0 or 1 based on a boolean result instead of having it just defined or undefined. bool to_string() will return 'true' or 'false' by default same as when using it to format a string, but with the additional possibility to specify two extra string arguments to be returned as true/false values, e.g. to_string('yes', 'no'). This can be useful when outputting messages to be shown to the user.
Diffstat (limited to 'mesonbuild/optinterpreter.py')
0 files changed, 0 insertions, 0 deletions