1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 14:51:16 +02:00

C API: Add nix_value_{inc,dec}ref

- Can be implemented more easily by more eval architectures.
- Better types in generated bindings remove some uncertainty and doubt.
This commit is contained in:
Robert Hensing 2024-06-13 18:21:04 +02:00
parent 0b56c98b1c
commit c50db4e58c
3 changed files with 33 additions and 0 deletions

View file

@ -189,6 +189,11 @@ void nix_state_free(EvalState * state);
* you're done with a value returned by the evaluator.
* @{
*/
// TODO: Deprecate nix_gc_incref in favor of the type-specific reference counting functions?
// e.g. nix_value_incref.
// It gives implementors more flexibility, and adds safety, so that generated
// bindings can be used without fighting the host type system (where applicable).
/**
* @brief Increment the garbage collector reference counter for the given object.
*