Home Explore Blog Models CI



nix

doc/manual/rl-next/c-api-byidx.md
6b920e8ecdf975ac54f498ba75596e8486b6cd5fcd8a3663000000030000016a
---
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.

Chunks
efb8decc (1st chunk of `doc/manual/rl-next/c-api-byidx.md`)
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.