diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2016-03-19 17:57:11 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim@centricular.com> | 2016-03-19 17:57:11 +0000 |
commit | 3eea1703ffb7559cc7d7454ced119aa45c167c9f (patch) | |
tree | c122e871e6db75250f0d4ad776cdfe3989e8ed27 /mesonbuild/optinterpreter.py | |
parent | dc049660e7d5e7c4b4a9ded4acb02fe90860adfb (diff) | |
download | meson-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