From 218a739b33325c5dd6baa5cf6291dad849ad2441 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Wed, 14 Dec 2022 08:03:32 +0200 Subject: Handle NULL values in $string() and $concat() functions This is relied upon by the parser to provide conversion/concatenation semantics consistent with untyped values. Note that we handle NULL values only for types that have empty representation. --- libbuild2/functions-integer.cxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libbuild2/functions-integer.cxx') diff --git a/libbuild2/functions-integer.cxx b/libbuild2/functions-integer.cxx index ddfc250..a634ae9 100644 --- a/libbuild2/functions-integer.cxx +++ b/libbuild2/functions-integer.cxx @@ -69,6 +69,9 @@ namespace build2 // $string() // $string([, [, ]]) // + // Note that we don't handle NULL values for these type since they have no + // empty representation. + // f["string"] += [](int64_t i) {return to_string (i);}; f["string"] += [](uint64_t i, optional base, optional width) -- cgit v1.1