aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/config/utility.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-06-14 06:15:57 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-06-14 06:15:57 +0200
commitcedc661686dad6d82b0a96ea1490d36bc5ffee63 (patch)
tree362614fa115c29ccd42e888ed380251ffd163cf9 /libbuild2/config/utility.hxx
parent38db461e03e949916221f7ae99b06751a3d05cce (diff)
Tighten value::extra usage in config module
Specifically, only values marked with 1 are treated as default leaving other values for use for other purposes.
Diffstat (limited to 'libbuild2/config/utility.hxx')
-rw-r--r--libbuild2/config/utility.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/libbuild2/config/utility.hxx b/libbuild2/config/utility.hxx
index 1e33568..72fe520 100644
--- a/libbuild2/config/utility.hxx
+++ b/libbuild2/config/utility.hxx
@@ -64,6 +64,11 @@ namespace build2
// omitted value(s) is the default (see a note in lookup_config()
// documentation for details).
//
+ // The below lookup_*() functions mark the default value by setting
+ // value::extra to 1. Note that it's exactly 1 and not "not 0" since other
+ // values could have other meaning (see, for example, package skeleton
+ // in bpkg).
+ //
const uint64_t save_default_commented = 0x01; // Based on value::extra.
const uint64_t save_null_omitted = 0x02; // Treat NULL as undefined.
const uint64_t save_empty_omitted = 0x04; // Treat empty as undefined.