From a3ed04f37c47e2eaa83d87dda2ec4ab060a7a2d0 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 2 Jun 2020 07:35:44 +0200 Subject: Add process_path_ex with program stable name and checksum --- libbuild2/variable.hxx | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'libbuild2/variable.hxx') diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx index 409a4aa..e5d8e72 100644 --- a/libbuild2/variable.hxx +++ b/libbuild2/variable.hxx @@ -881,8 +881,8 @@ namespace build2 static_assert (sizeof (process_path) <= value::size_, "insufficient space"); - // This one is represented as a @-pair of names. As a result it cannot - // be stored in a container. + // Represented as a @-pair of names. As a result it cannot be stored in a + // container. // static process_path convert (name&&, name*); static void assign (value&, process_path&&); @@ -894,6 +894,26 @@ namespace build2 static const build2::value_type value_type; }; + // process_path_ex + // + template <> + struct LIBBUILD2_SYMEXPORT value_traits + { + static_assert (sizeof (process_path_ex) <= value::size_, + "insufficient space"); + + // Represented as a @-pair of names corresponding to process_path followed + // by the name@ and checksum@ pairs. So it's a container-like. + // + static process_path_ex convert (names&&); + static void assign (value&, process_path_ex&&); + static bool empty (const process_path_ex& x) {return x.empty ();} + + static const bool empty_value = true; + static const char* const type_name; + static const build2::value_type value_type; + }; + // target_triplet // template <> -- cgit v1.1