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:
parent
7c602d9f01
commit
c49b88b066
7 changed files with 18 additions and 12 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue