From 6d7aef62de3dd6a5900816b002bf9304d763e052 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Sun, 21 May 2023 17:49:32 +0200 Subject: Update liballoc --- lib/liballoc | 2 +- src/strvec.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/liballoc b/lib/liballoc index db11471..fa03741 160000 --- a/lib/liballoc +++ b/lib/liballoc @@ -1 +1 @@ -Subproject commit db114713e3958e350da181c8894ccf330320f66b +Subproject commit fa03741cf151f639e361b556f9e60d1925f41d42 diff --git a/src/strvec.c b/src/strvec.c index bf8b95c..7073edf 100644 --- a/src/strvec.c +++ b/src/strvec.c @@ -40,13 +40,13 @@ strvec_alloc(size_t cap, struct allocator *allocator, int *_rc) rc = _rc ? _rc : &stub; - strvec = allocator->alloc(sizeof(struct strvec), rc); + strvec = allocator->alloc(allocator, sizeof(struct strvec), rc); if (!strvec && _rc) *rc = -*rc; if (!strvec) return NULL; *rc = strvec_init(strvec, cap, allocator); if (*rc) { - allocator->free(strvec); + allocator->free(allocator, strvec); return NULL; } @@ -67,7 +67,7 @@ strvec_free(struct strvec *strvec) LIBSTRVEC_ABORT_ON_ALLOC(rc < 0); if (rc) return rc; - rc = allocator->free(strvec); + rc = allocator->free(allocator, strvec); LIBSTRVEC_ABORT_ON_ALLOC(rc); if (rc) return -rc; @@ -88,7 +88,7 @@ strvec_copy(struct strvec *dst, struct strvec *src, for (DVEC_ITER(&dst->vec, str)) { if (!*str) continue; len = strlen(*str); - nstr = allocator->alloc(len + 1, &rc); + nstr = allocator->alloc(allocator, len + 1, &rc); LIBSTRVEC_ABORT_ON_ALLOC(!nstr); if (!nstr) return rc; strncpy(nstr, *str, len + 1); -- cgit v1.2.3-71-gd317