Make some reorganization in struct xbps_handle.
The variables to set cachedir, rootdir and metadir have been changed to "array of chars", this way there are no extra allocations. Update clients accordingly and bump API version.
This commit is contained in:
@ -193,8 +193,10 @@ main(int argc, char **argv)
|
||||
/*
|
||||
* Initialize libxbps.
|
||||
*/
|
||||
xh.rootdir = rootdir;
|
||||
xh.cachedir = cachedir;
|
||||
if (rootdir)
|
||||
strncpy(xh.rootdir, rootdir, sizeof(xh.rootdir));
|
||||
if (cachedir)
|
||||
strncpy(xh.cachedir, cachedir, sizeof(xh.cachedir));
|
||||
xh.conffile = conffile;
|
||||
xh.flags = flags;
|
||||
|
||||
|
Reference in New Issue
Block a user