Home Explore Blog Models CI



nix

1st chunk of `doc/manual/rl-next/c-api-byidx.md`
efb8deccabaa785f87625443ef9fb1e1875cd9c6f39d27df000000010000016a
---
synopsis: "C API: `nix_get_attr_name_byidx`, `nix_get_attr_byidx` take a `nix_value *` instead of `const nix_value *`"
prs: [13987]
---

In order to accommodate a more optimized internal representation of attribute set merges these functions require
a mutable `nix_value *` that might be modified on access. This does *not* break the ABI of these functions.

Title: C API Functions Now Require Mutable `nix_value *`
Summary
The C API functions `nix_get_attr_name_byidx` and `nix_get_attr_byidx` have been updated to accept a mutable `nix_value *` instead of a `const nix_value *`. This change allows for a more optimized internal representation of attribute set merges, as the `nix_value *` might be modified upon access. The update does not break the existing ABI of these functions.