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

nix_api_expr: remove bindingsbuilder refcounting

This commit is contained in:
Yorick van Pelt 2023-07-27 15:58:18 +02:00 committed by José Luis Lafuente
parent aa85f7d917
commit 022b918db1
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
3 changed files with 27 additions and 21 deletions

View file

@ -36,11 +36,12 @@ typedef struct State State;
typedef struct GCRef GCRef;
// type defs
/** @brief Stores an under-construction set of bindings
* Reference-counted
* @see nix_make_bindings_builder, nix_bindings_builder_unref, nix_make_attrs
*
* Do not reuse.
* @see nix_make_bindings_builder, nix_bindings_builder_free, nix_make_attrs
* @see nix_bindings_builder_insert
*/
typedef void BindingsBuilder;
typedef struct BindingsBuilder BindingsBuilder;
/** @brief PrimOp function
*
@ -328,13 +329,12 @@ BindingsBuilder *nix_make_bindings_builder(nix_c_context *context, State *state,
nix_err nix_bindings_builder_insert(nix_c_context *context,
BindingsBuilder *builder, const char *name,
Value *value);
/** @brief Unref a bindings builder
/** @brief Free a bindings builder
*
* Does not fail.
* It'll be deallocated when all references are gone.
* @param[in] builder the builder to unref
* @param[in] builder the builder to free
*/
void nix_bindings_builder_unref(BindingsBuilder *builder);
void nix_bindings_builder_free(BindingsBuilder *builder);
// cffi end
#ifdef __cplusplus