--- a/ui/common/context.c Thu Oct 03 18:52:51 2024 +0200 +++ b/ui/common/context.c Sun Oct 06 18:18:04 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