libxbps: ABI/API break due to xbps_pkg{,pattern}_name changes.
The funcs xbps_pkg_name() and xbps_pkgpattern_name() were using malloc(3) to return the result, until now. They now have been changed to not allocate the result via malloc, the caller is responsible to provide a buffer at least of XBPS_NAME_SIZE (64). If for whatever reason the pkgname can't be guessed, returns false. This should avoid lots of small allocs around libxbps. New functions have the following prototype: bool xbps_pkg_name(char *dst, size_t len, const char *pkg) bool xbps_pkgpattern_name(char *dst, size_t len, const char *pkg) as suggested by @duncaen.
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
|
||||
RANLIB ?= ranlib
|
||||
|
||||
LIBXBPS_MAJOR = 4
|
||||
LIBXBPS_MINOR = 1
|
||||
LIBXBPS_MAJOR = 5
|
||||
LIBXBPS_MINOR = 0
|
||||
LIBXBPS_MICRO = 0
|
||||
LIBXBPS_SHLIB = libxbps.so.$(LIBXBPS_MAJOR).$(LIBXBPS_MINOR).$(LIBXBPS_MICRO)
|
||||
LDFLAGS += $(LIBXBPS_LDFLAGS) -shared -Wl,-soname,libxbps.so.$(LIBXBPS_MAJOR)
|
||||
|
||||
Reference in New Issue
Block a user