ui/common/types.c

changeset 49
2f71f4ee247a
parent 27
c254ed644edf
--- a/ui/common/types.c	Thu Oct 03 18:52:51 2024 +0200
+++ b/ui/common/types.c	Sun Oct 06 18:18:04 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*));

mercurial