From ad5366c2ad43216ac9a61ccb1477ff9859d1a75c Mon Sep 17 00:00:00 2001 From: eldritch horrors Date: Sun, 16 Jun 2024 23:10:09 +0200 Subject: libexpr: pass Exprs as references, not pointers almost all places where Exprs are passed as pointers expect the pointers to be non-null. pass them as references to encode this constraint in the type system as well (and also communicate that Exprs must not be freed). Change-Id: Ia98f166fec3c23151f906e13acb4a0954a5980a2 --- src/nix/main.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nix/main.cc') diff --git a/src/nix/main.cc b/src/nix/main.cc index 074a59049..55f8d59ba 100644 --- a/src/nix/main.cc +++ b/src/nix/main.cc @@ -234,7 +234,7 @@ static void showHelp(std::vector subcommand, NixArgs & toplevel) auto vUtils = state.allocValue(); state.cacheFile( CanonPath("/utils.nix"), CanonPath("/utils.nix"), - state.parseExprFromString( + &state.parseExprFromString( #include "utils.nix.gen.hh" , CanonPath::root), *vUtils); -- cgit v1.2.3