# HG changeset patch # User Olaf Wintermann # Date 1728209320 -7200 # Node ID 99a93a9250c488955a053cc6e23953d7bf9531a1 # Parent ce13a778654a6e45bd6af29b89ec1be22921fe44 fix build diff -r ce13a778654a -r 99a93a9250c4 ui/common/context.c --- a/ui/common/context.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/context.c Sun Oct 06 12:08:40 2024 +0200 @@ -91,7 +91,7 @@ // as any document variable UiContext *var_ctx = ctx; while(var_ctx) { - if(var_ctx->vars_unbound && var_ctx->vars_unbound->size > 0) { + if(var_ctx->vars_unbound && cxMapSize(var_ctx->vars_unbound) > 0) { CxIterator i = cxMapIterator(var_ctx->vars_unbound); cx_foreach(CxMapEntry*, entry, i) { UiVar *var = entry->value; @@ -401,9 +401,9 @@ var->value = value; var->from = NULL; var->from_ctx = ctx; - size_t oldcount = ctx->vars->size; + size_t oldcount = cxMapSize(ctx->vars); cxMapPut(ctx->vars, name, var); - if(ctx->vars->size != oldcount + 1) { + if(cxMapSize(ctx->vars) != oldcount + 1) { fprintf(stderr, "UiError: var '%s' already exists\n", name); } @@ -462,7 +462,7 @@ } int* ui_active_groups(UiContext *ctx, int *ngroups) { - *ngroups = ctx->groups->size; + *ngroups = cxListSize(ctx->groups); return cxListAt(ctx->groups, 0); } @@ -516,7 +516,7 @@ gw.widget = widget; gw.enable = enable; - gw.numgroups = groups->size; + gw.numgroups = cxListSize(groups); gw.groups = cxCalloc(a, gw.numgroups, sizeof(int)); // copy groups diff -r ce13a778654a -r 99a93a9250c4 ui/common/menu.c --- a/ui/common/menu.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/menu.c Sun Oct 06 12:08:40 2024 +0200 @@ -104,7 +104,7 @@ menu->end = 0; - if (current->size == 0) { + if (cxListSize(current) == 0) { add_menu(menu); } else { diff -r ce13a778654a -r 99a93a9250c4 ui/common/toolbar.c --- a/ui/common/toolbar.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/toolbar.c Sun Oct 06 12:08:40 2024 +0200 @@ -132,7 +132,7 @@ } UiBool uic_toolbar_isenabled(void) { - return toolbar_defaults[0]->size + toolbar_defaults[1]->size + toolbar_defaults[2]->size > 0; + return cxListSize(toolbar_defaults[0]) + cxListSize(toolbar_defaults[1]) + cxListSize(toolbar_defaults[2]) > 0; } UiToolbarItemI* uic_toolbar_get_item(const char* name) { diff -r ce13a778654a -r 99a93a9250c4 ui/common/types.c --- a/ui/common/types.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/types.c Sun Oct 06 12:08:40 2024 +0200 @@ -139,7 +139,7 @@ } int ui_list_count(UiList *list) { - return ((CxList*)list->data)->size; + return cxListSize(list->data); } void ui_list_append(UiList *list, void *data) { @@ -192,7 +192,7 @@ va_end(ap); - size_t len = cols->size; + size_t len = cxListSize(cols); info->columns = len; info->types = ui_calloc(ctx, len, sizeof(UiModelType)); info->titles = ui_calloc(ctx, len, sizeof(char*)); diff -r ce13a778654a -r 99a93a9250c4 ui/common/ucx_properties.c --- a/ui/common/ucx_properties.c Sun Oct 06 12:00:31 2024 +0200 +++ b/ui/common/ucx_properties.c Sun Oct 06 12:08:40 2024 +0200 @@ -201,12 +201,12 @@ cxstring name; cxstring value; while(ucx_properties_next(parser, &name, &value)) { - cxmutstr mutvalue = cx_strdup_a(map->allocator, value); + cxmutstr mutvalue = cx_strdup_a(map->collection.allocator, value); if(!mutvalue.ptr) { return 1; } if(cxMapPut(map, cx_hash_key_cxstr(name), mutvalue.ptr)) { - cxFree(map->allocator, mutvalue.ptr); + cxFree(map->collection.allocator, mutvalue.ptr); return 1; } }