libexpr: move eval memory allocation to own struct

Change-Id: I9d472c9606fe66fdc1cb7cb9dcf6d1b6b46c6686
This commit is contained in:
eldritch horrors
2024-11-28 15:12:22 +00:00
parent cb8262e11c
commit f5754dc90a
26 changed files with 229 additions and 207 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ RC_GTEST_FIXTURE_PROP(
prop_opaque_path_round_trip,
(const SingleDerivedPath::Opaque & o))
{
auto * v = state.allocValue();
auto * v = state.mem.allocValue();
state.mkStorePathString(o.path, *v);
auto d = state.coerceToSingleDerivedPath(noPos, *v, "");
RC_ASSERT(SingleDerivedPath { o } == d);
@@ -46,7 +46,7 @@ RC_GTEST_FIXTURE_PROP(
ExperimentalFeatureSettings mockXpSettings;
mockXpSettings.set("experimental-features", "ca-derivations");
auto * v = state.allocValue();
auto * v = state.mem.allocValue();
state.mkOutputString(*v, b, std::nullopt, mockXpSettings);
auto [d, _] = state.coerceToSingleDerivedPathUnchecked(noPos, *v, "");
RC_ASSERT(SingleDerivedPath { b } == d);
@@ -57,7 +57,7 @@ RC_GTEST_FIXTURE_PROP(
prop_derived_path_built_out_path_round_trip,
(const SingleDerivedPath::Built & b, const StorePath & outPath))
{
auto * v = state.allocValue();
auto * v = state.mem.allocValue();
state.mkOutputString(*v, b, outPath);
auto [d, _] = state.coerceToSingleDerivedPathUnchecked(noPos, *v, "");
RC_ASSERT(SingleDerivedPath { b } == d);