mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2025-02-16 23:27:17 +02:00
libstore-c: Add nix_store_path_clone
This commit is contained in:
parent
48808a5320
commit
1233bcde37
2 changed files with 13 additions and 0 deletions
|
@ -132,3 +132,8 @@ void nix_store_path_free(StorePath * sp)
|
||||||
{
|
{
|
||||||
delete 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);
|
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
|
/** @brief Deallocate a StorePath
|
||||||
*
|
*
|
||||||
* Does not fail.
|
* Does not fail.
|
||||||
|
|
Loading…
Add table
Reference in a new issue