1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-24 11:19:35 +01:00

c api: shovel EvalMemory * into nix_value

this is a painful change. we should really add EvalState or EvalMemory
as an argument to various functions as we need it, but because we want
to preserve the stablity API, we hack it in as a field of nix_value.
This commit is contained in:
Taeer Bar-Yam 2025-11-21 18:38:14 +01:00
parent 152e7e48c1
commit 9b9446e860
4 changed files with 57 additions and 33 deletions

View file

@ -39,7 +39,13 @@ struct ListBuilder
struct nix_value
{
nix::Value value;
nix::Value * value;
/**
* As we move to a managed heap, we need EvalMemory in more places. Ideally, we would take in EvalState or
* EvalMemory as an argument when we need it, but we don't want to make changes to the stable C api, so we stuff it
* into the nix_value that will get passed in to the relevant functions.
*/
nix::EvalMemory * mem;
};
struct nix_string_return