ui/common/context.c

changeset 33
458831c574f4
parent 25
78ae3efe463f
child 37
56016468753d
--- a/ui/common/context.c	Sat Apr 12 13:44:53 2014 +0200
+++ b/ui/common/context.c	Sat May 10 15:43:22 2014 +0200
@@ -119,6 +119,21 @@
                     sizeof(UiInteger));
             return s;
         }
+        case UI_VAR_TEXT: {
+            UiText *t = a->calloc(
+                    a->pool,
+                    1,
+                    sizeof(UiText));
+            return t;
+        }
+        case UI_VAR_LIST: {
+            UiListVar *l = a->malloc(a->pool, sizeof(UiListVar));
+            UiListPtr *lp = a->malloc(a->pool, sizeof(UiListPtr));
+            l->listptr = lp;
+            lp->list = NULL;
+            // TODO: create empty list
+            return l;
+        }
     }
     return NULL;
 }
@@ -181,7 +196,7 @@
     
     int i = 0;
     UCX_FOREACH(elm, ctx->groups) {
-        groups[i++] = (int)elm->data;
+        groups[i++] = (intptr_t)elm->data;
     }
     
     *ngroups = nelm;

mercurial