Use cl_ namespace for interface as well and fix one internal reference to own struct

This commit is contained in:
Alex D. 2021-08-28 22:59:48 +00:00
parent 1036867979
commit 7d51b6a3ff
Signed by: caskd
GPG Key ID: F92BA85F61F4C173
2 changed files with 3 additions and 3 deletions

View File

@ -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 // 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 = { .make = {
.new = corelibs_dynarray_make_new, .new = corelibs_dynarray_make_new,
.slice = corelibs_dynarray_make_slice, .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; 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 // Resize array to fit new elements
if ((err = corelibs_dynarray_mod_arr_cap(arr, pos + cnt)) != CORELIBS_DYNARRAY_ERR_OK) goto ret; if ((err = corelibs_dynarray_mod_arr_cap(arr, pos + cnt)) != CORELIBS_DYNARRAY_ERR_OK) goto ret;
} }

View File

@ -103,7 +103,7 @@ struct corelibs_dynarray_interface {
} err; } err;
}; };
extern const struct corelibs_dynarray_interface dynarray; extern const struct corelibs_dynarray_interface cl_dynarray;
#endif /* CORELIBS_GUARD_DYNARRAY */ #endif /* CORELIBS_GUARD_DYNARRAY */