mirror of
https://github.com/NixOS/nix
synced 2024-09-19 23:03:53 -04:00
libstore-c: Add nix_store_path_clone
This commit is contained in:
parent
48808a5320
commit
1233bcde37
|
@ -132,3 +132,8 @@ void nix_store_path_free(StorePath * sp)
|
|||
{
|
||||
delete sp;
|
||||
}
|
||||
|
||||
StorePath * nix_store_path_clone(const StorePath * p)
|
||||
{
|
||||
return new StorePath{p->path};
|
||||
}
|
||||
|
|
|
@ -90,6 +90,14 @@ nix_err nix_store_get_uri(nix_c_context * context, Store * store, void * callbac
|
|||
*/
|
||||
StorePath * nix_store_parse_path(nix_c_context * context, Store * store, const char * path);
|
||||
|
||||
/**
|
||||
* @brief Copy a StorePath
|
||||
*
|
||||
* @param[in] p the path to copy
|
||||
* @return a new StorePath
|
||||
*/
|
||||
StorePath * nix_store_path_clone(const StorePath * p);
|
||||
|
||||
/** @brief Deallocate a StorePath
|
||||
*
|
||||
* Does not fail.
|
||||
|
|
Loading…
Reference in a new issue