From cedc661686dad6d82b0a96ea1490d36bc5ffee63 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 14 Jun 2022 06:15:57 +0200 Subject: 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. --- libbuild2/config/utility.hxx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libbuild2/config/utility.hxx') 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. -- cgit v1.1