From be2b19041eeec53fba24f7c2494f3f700a4ec595 Mon Sep 17 00:00:00 2001 From: Eli Kogan-Wang Date: Fri, 13 May 2022 22:02:28 +0200 Subject: Integrate review changes --- src/libexpr/eval-cache.hh | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/libexpr/eval-cache.hh') diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh index 636e293ad..105e9217b 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/eval-cache.hh @@ -63,6 +63,7 @@ typedef std::variant< misc_t, failed_t, bool, + NixInt, std::vector > AttrValue; @@ -116,6 +117,8 @@ public: bool getBool(); + NixInt getInt(); + std::vector getListOfStrings(); std::vector getAttrs(); -- cgit v1.2.3 From c81d24f1c70cc454c9a88cea70048d8563f60784 Mon Sep 17 00:00:00 2001 From: Eli Kogan-Wang Date: Mon, 16 May 2022 02:28:21 +0200 Subject: Add int to eval-cache, bump eval cache schema version --- src/libexpr/eval-cache.hh | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libexpr/eval-cache.hh') diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh index 105e9217b..ec255c60d 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/eval-cache.hh @@ -45,6 +45,7 @@ enum AttrType { Failed = 5, Bool = 6, ListOfStrings = 7, + Int = 8, }; struct placeholder_t {}; -- cgit v1.2.3 From 27d0f6747d7e70be4b9ade28ce77444e6135cadb Mon Sep 17 00:00:00 2001 From: Eli Kogan-Wang Date: Mon, 16 May 2022 15:17:35 +0200 Subject: resolve redundant priority passing, wrap NixInt in eval-cache variant --- src/libexpr/eval-cache.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/libexpr/eval-cache.hh') diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh index ec255c60d..68b5952eb 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/eval-cache.hh @@ -52,6 +52,7 @@ struct placeholder_t {}; struct missing_t {}; struct misc_t {}; struct failed_t {}; +struct int_t { NixInt x; int_t(NixInt x) : x(x) {}; }; typedef uint64_t AttrId; typedef std::pair AttrKey; typedef std::pair string_t; @@ -64,7 +65,7 @@ typedef std::variant< misc_t, failed_t, bool, - NixInt, + int_t, std::vector > AttrValue; -- cgit v1.2.3 From 43a2c1367292733d3e0aa2e57137c897fb66d8f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9ophane=20Hufschmitt?= Date: Mon, 16 May 2022 16:36:21 +0200 Subject: Make nix::eval_cache::int_t more idiomatic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t explicitely give it a constructor, but use aggregate initialization instead (also prevents having an implicit coertion, which is probably good here) --- src/libexpr/eval-cache.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/libexpr/eval-cache.hh') diff --git a/src/libexpr/eval-cache.hh b/src/libexpr/eval-cache.hh index 68b5952eb..c93e55b93 100644 --- a/src/libexpr/eval-cache.hh +++ b/src/libexpr/eval-cache.hh @@ -52,7 +52,7 @@ struct placeholder_t {}; struct missing_t {}; struct misc_t {}; struct failed_t {}; -struct int_t { NixInt x; int_t(NixInt x) : x(x) {}; }; +struct int_t { NixInt x; }; typedef uint64_t AttrId; typedef std::pair AttrKey; typedef std::pair string_t; -- cgit v1.2.3