From 7d51b6a3ff6c04a25cdf85745d2d9b93d1344fc5 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sat, 28 Aug 2021 22:59:48 +0000 Subject: [PATCH] Use cl_ namespace for interface as well and fix one internal reference to own struct --- dynarray.c | 4 ++-- dynarray.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dynarray.c b/dynarray.c index e141f52..f892af0 100644 --- a/dynarray.c +++ b/dynarray.c @@ -75,7 +75,7 @@ enum { // Avoid collision in error numbers }; // Present a unified structure that may receive changes, deprecations and renames without hassle for external users -const struct corelibs_dynarray_interface dynarray = { +const struct corelibs_dynarray_interface cl_dynarray = { .make = { .new = corelibs_dynarray_make_new, .slice = corelibs_dynarray_make_slice, @@ -325,7 +325,7 @@ corelibs_dynarray_mod_ct_rep(cl_dynarray_t* arr, uintmax_t pos, uintmax_t cnt, c goto ret; } - if (corelibs_dynarray_bcheck(arr, pos, cnt) == dynarray.err.mem.oob) { + if (corelibs_dynarray_bcheck(arr, pos, cnt) == CORELIBS_DYNARRAY_ERR_MEM_OOB) { // Resize array to fit new elements if ((err = corelibs_dynarray_mod_arr_cap(arr, pos + cnt)) != CORELIBS_DYNARRAY_ERR_OK) goto ret; } diff --git a/dynarray.h b/dynarray.h index bd566e4..c533a75 100644 --- a/dynarray.h +++ b/dynarray.h @@ -103,7 +103,7 @@ struct corelibs_dynarray_interface { } err; }; -extern const struct corelibs_dynarray_interface dynarray; +extern const struct corelibs_dynarray_interface cl_dynarray; #endif /* CORELIBS_GUARD_DYNARRAY */