1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-28 17:51:15 +02:00

primops: change to std::function, allowing the passing of user data

This commit is contained in:
Yorick van Pelt 2023-08-28 18:20:23 +02:00 committed by José Luis Lafuente
parent 9e423dee11
commit 48aa57549d
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
2 changed files with 7 additions and 3 deletions

View file

@ -17,6 +17,7 @@
#include <optional>
#include <unordered_map>
#include <mutex>
#include <functional>
namespace nix {
@ -72,7 +73,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.