1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-16 15:32:43 +01:00

C API: update docs based on PR feedback

This commit is contained in:
José Luis Lafuente 2024-02-25 14:20:57 +01:00 committed by José Luis Lafuente
parent 7c602d9f01
commit c49b88b066
No known key found for this signature in database
GPG key ID: 8A3455EBE455489A
7 changed files with 18 additions and 12 deletions

View file

@ -50,7 +50,7 @@ Store * nix_store_open(nix_c_context * context, const char * uri, const char ***
NIXC_CATCH_ERRS_NULL
}
void nix_store_unref(Store * store)
void nix_store_free(Store * store)
{
delete store;
}

View file

@ -48,23 +48,24 @@ nix_err nix_init_plugins(nix_c_context * context);
/**
* @brief Open a nix store
* Store instances may share state and resources behind the scenes.
* @param[out] context Optional, stores error information
* @param[in] uri URI of the nix store, copied
* @param[in] params optional, array of key-value pairs, {{"endpoint",
* "https://s3.local"}}
* @return ref-counted Store pointer, NULL in case of errors
* @see nix_store_unref
* @return a Store pointer, NULL in case of errors
* @see nix_store_free
*/
Store * nix_store_open(nix_c_context *, const char * uri, const char *** params);
/**
* @brief Unref a nix store
* @brief Deallocate a nix store and free any resources if not also held by other Store instances.
*
* Does not fail.
* It'll be closed and deallocated when all references are gone.
* @param[in] builder the store to unref
*
* @param[in] store the store to free
*/
void nix_store_unref(Store * store);
void nix_store_free(Store * store);
/**
* @brief get the URI of a nix store