diff options
author | Yorick van Pelt <yorick@yorickvanpelt.nl> | 2023-08-28 18:20:23 +0200 |
---|---|---|
committer | Puck Meerburg <puck@puckipedia.com> | 2024-05-16 13:01:40 +0000 |
commit | 194654c96f61acc6dc47dd3126ad47618d45a0c8 (patch) | |
tree | 29a479d197f81ac80c4a260969e2ad39e0e9de95 /src/libexpr/eval.hh | |
parent | c6bb377c91f40ae571d0a0fc951b736cb8fc2ead (diff) |
primops: change to std::function, allowing the passing of user data
(cherry picked from commit 48aa57549d514432d6621c1e29f051951eca2d7f)
Change-Id: Ib7d5c6514031ceb6c42ac44588be6b0c1c3c225b
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 2291d618c..411364d9f 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -17,6 +17,7 @@ #include <optional> #include <unordered_map> #include <mutex> +#include <functional> namespace nix { @@ -71,7 +72,7 @@ struct PrimOp /** * Implementation of the primop. */ - PrimOpFun fun; + std::function<std::remove_pointer<PrimOpFun>::type> fun; /** * Optional experimental for this to be gated on. |