From 1fc9ba4885f5a16e263bcc5e58bef68e3aa32cea Mon Sep 17 00:00:00 2001 From: Kane York Date: Thu, 13 Aug 2020 16:40:27 -0700 Subject: refactor(tvix): always pass Bindings by ptr, use shared/unique_ptr Value now carries a shared_ptr, and all Bindings constructors return a unique_ptr. The test that wanted to compare two Bindings by putting them into Values has been modified to use the new Equal() method on Bindings (extracted from EvalState). Change-Id: I8dfb60e65fdabb717e3b3e5d56d5b3fc82f70883 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1744 Tested-by: BuildkiteCI Reviewed-by: glittershark Reviewed-by: tazjin --- third_party/nix/src/libexpr/eval.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'third_party/nix/src/libexpr/eval.hh') diff --git a/third_party/nix/src/libexpr/eval.hh b/third_party/nix/src/libexpr/eval.hh index f3e38cfb3cb6..aa7af777a1f1 100644 --- a/third_party/nix/src/libexpr/eval.hh +++ b/third_party/nix/src/libexpr/eval.hh @@ -247,8 +247,9 @@ class EvalState { void callPrimOp(Value& fun, Value& arg, Value& v, const Pos& pos); /* Automatically call a function for which each argument has a - default value or has a binding in the `args' map. */ - void autoCallFunction(Bindings& args, Value& fun, Value& res); + default value or has a binding in the `args' map. 'args' need + not live past the end of the call. */ + void autoCallFunction(Bindings* args, Value& fun, Value& res); /* Allocation primitives. */ Value* allocValue(); -- cgit 1.4.1