diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-02 07:35:44 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2020-06-02 07:35:44 +0200 |
commit | a3ed04f37c47e2eaa83d87dda2ec4ab060a7a2d0 (patch) | |
tree | 1ca68321bc7203cfef635dab6820f35435279ee0 /libbuild2/variable.hxx | |
parent | dcbd81ad1c303dd2b9ef54e8e7e485bb17c6de49 (diff) |
Add process_path_ex with program stable name and checksum
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r-- | libbuild2/variable.hxx | 24 |
1 files changed, 22 insertions, 2 deletions
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<process_path_ex> + { + 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 <> |