Skip to content

Commit a08ae1d

Browse files
committed
doc: Add release notes for C API lazy accessors
1 parent c121c65 commit a08ae1d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
synopsis: "C API: Add lazy attribute and list item accessors"
3+
prs: [14030]
4+
---
5+
6+
The C API now includes lazy accessor functions for retrieving values from lists and attribute sets without forcing evaluation:
7+
8+
- `nix_get_list_byidx_lazy()` - Get a list element without forcing its evaluation
9+
- `nix_get_attr_byname_lazy()` - Get an attribute value by name without forcing evaluation
10+
- `nix_get_attr_byidx_lazy()` - Get an attribute by index without forcing evaluation
11+
12+
These functions are useful when forwarding unevaluated sub-values to other lists, attribute sets, or function calls. They allow more efficient handling of Nix values by deferring evaluation until actually needed.
13+
14+
Additionally, bounds checking has been improved for all `_byidx` functions to properly validate indices before access, preventing potential out-of-bounds errors.
15+
16+
The documentation for `NIX_ERR_KEY` error handling has also been clarified to specify when this error code is returned.

0 commit comments

Comments
 (0)