Make the xbps_handle struct const internally.
This commit is contained in:
parent
3acf91bb15
commit
afe0f3e2f0
@ -78,7 +78,7 @@ __BEGIN_DECLS
|
|||||||
* @private
|
* @private
|
||||||
* From lib/initend.c
|
* From lib/initend.c
|
||||||
*/
|
*/
|
||||||
struct xbps_handle HIDDEN *xbps_handle_get(void);
|
const struct xbps_handle HIDDEN *xbps_handle_get(void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @private
|
* @private
|
||||||
|
@ -91,7 +91,7 @@ xbps_fetch_file(const char *uri,
|
|||||||
bool refetch,
|
bool refetch,
|
||||||
const char *flags)
|
const char *flags)
|
||||||
{
|
{
|
||||||
struct xbps_handle *xhp;
|
const struct xbps_handle *xhp;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
struct url *url = NULL;
|
struct url *url = NULL;
|
||||||
struct url_stat url_st;
|
struct url_stat url_st;
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
* using libxbps and finalize usage to release resources at the end.
|
* using libxbps and finalize usage to release resources at the end.
|
||||||
*/
|
*/
|
||||||
static bool debug;
|
static bool debug;
|
||||||
static struct xbps_handle *xhp;
|
static const struct xbps_handle *xhp;
|
||||||
|
|
||||||
void
|
void
|
||||||
xbps_init(struct xbps_handle *xh)
|
xbps_init(struct xbps_handle *xh)
|
||||||
@ -63,7 +63,7 @@ xbps_end(void)
|
|||||||
xhp = NULL;
|
xhp = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct xbps_handle HIDDEN *
|
const struct xbps_handle HIDDEN *
|
||||||
xbps_handle_get(void)
|
xbps_handle_get(void)
|
||||||
{
|
{
|
||||||
return xhp;
|
return xhp;
|
||||||
|
@ -160,7 +160,7 @@ unpack_archive(prop_dictionary_t pkg_repod,
|
|||||||
struct archive *ar,
|
struct archive *ar,
|
||||||
const char *pkgname,
|
const char *pkgname,
|
||||||
const char *version,
|
const char *version,
|
||||||
struct xbps_handle *xhp)
|
const struct xbps_handle *xhp)
|
||||||
{
|
{
|
||||||
prop_dictionary_t propsd = NULL, filesd = NULL, old_filesd = NULL;
|
prop_dictionary_t propsd = NULL, filesd = NULL, old_filesd = NULL;
|
||||||
prop_array_t array;
|
prop_array_t array;
|
||||||
@ -463,7 +463,7 @@ out:
|
|||||||
int
|
int
|
||||||
xbps_unpack_binary_pkg(prop_dictionary_t pkg_repod)
|
xbps_unpack_binary_pkg(prop_dictionary_t pkg_repod)
|
||||||
{
|
{
|
||||||
struct xbps_handle *xhp;
|
const struct xbps_handle *xhp;
|
||||||
struct archive *ar;
|
struct archive *ar;
|
||||||
const char *pkgname, *version, *repoloc;
|
const char *pkgname, *version, *repoloc;
|
||||||
char *bpkg;
|
char *bpkg;
|
||||||
|
Loading…
Reference in New Issue
Block a user