repo: introduce xbps_repo_release(), misc changes.
- xbps_repo_release(): new function to release all resources associated with a repository object. - xbps_repo_close(): this now just closes the file descriptor associated with the archive and associated resources. - repo_open_local: after getting the repository dictionaries, use xbps_repo_close() to release archive resources. Bump XBPS_API_VERSION.
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
*
|
||||
* This header documents the full API for the XBPS Library.
|
||||
*/
|
||||
#define XBPS_API_VERSION "20200221"
|
||||
#define XBPS_API_VERSION "20200414"
|
||||
|
||||
#ifndef XBPS_VERSION
|
||||
#define XBPS_VERSION "UNSET"
|
||||
@@ -1645,12 +1645,21 @@ struct xbps_repo *xbps_repo_stage_open(struct xbps_handle *xhp, const char *url)
|
||||
struct xbps_repo *xbps_repo_public_open(struct xbps_handle *xhp, const char *url);
|
||||
|
||||
/**
|
||||
* Closes a repository object and releases resources.
|
||||
* Closes a repository object, its archive associated is
|
||||
* closed and those resources released.
|
||||
*
|
||||
* @param[in] repo The repository object to close.
|
||||
*/
|
||||
void xbps_repo_close(struct xbps_repo *repo);
|
||||
|
||||
/**
|
||||
* This calls \fn xbps_repo_close and releases all resources
|
||||
* associated with this repository object.
|
||||
*
|
||||
* @param[in] repo The repository object to release.
|
||||
*/
|
||||
void xbps_repo_release(struct xbps_repo *repo);
|
||||
|
||||
/**
|
||||
*
|
||||
* Returns a heap-allocated string with the repository local path.
|
||||
|
||||
Reference in New Issue
Block a user