use the new kv_list from UCX for the behavior map default tip

Fri, 26 Sep 2025 22:44:42 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 26 Sep 2025 22:44:42 +0200
changeset 276
789215559ea8
parent 275
2256af1440db

use the new kv_list from UCX for the behavior map

src/behavior.c file | annotate | diff | comparison | revisions
--- a/src/behavior.c	Sat Aug 23 21:01:41 2025 +0200
+++ b/src/behavior.c	Fri Sep 26 22:44:42 2025 +0200
@@ -31,7 +31,7 @@
 #include "ascension/util.h"
 #include "ascension/error.h"
 
-#include <cx/hash_map.h>
+#include <cx/kv_list.h>
 #include <cx/tree.h>
 
 #include <assert.h>
@@ -46,7 +46,7 @@
 }
 
 static CxMap *asc_behavior_new_map(void) {
-    CxMap *map = cxHashMapCreateSimple(sizeof(AscBehavior));
+    CxMap *map = cxKvListCreateAsMapSimple(sizeof(AscBehavior));
     cxDefineDestructor(map, asc_behavior_destroy);
     return map;
 }
@@ -58,7 +58,6 @@
     cxmutstr name = args.name == NULL
         ? asc_util_gen_name("behavior")
         : cx_mutstr(strdup(args.name));
-    // FIXME: we need the ordered map here, because the execution order of behaviors is important
     AscBehavior *behavior = cxMapEmplace(node->behaviors, name);
     assert(behavior != NULL);
     behavior->enabled = !args.start_disabled;

mercurial