From 8f0c3d4697742fb64cb1af8ba28fa2bb6f99de5a Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Wed, 6 May 2026 17:46:49 +0800 Subject: Implemented tokenizer. --- wv_dom.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'wv_dom.c') diff --git a/wv_dom.c b/wv_dom.c index ee24e98..a17c1bc 100644 --- a/wv_dom.c +++ b/wv_dom.c @@ -8,7 +8,7 @@ wv_ref wv_node_new(struct wv_arena *arena, wv_node_type type) wv_ref ref; struct wv_node *node; - ref = wv_alloc(arena, sizeof(struct wv_node)); + ref = wv_arena_alloc(arena, sizeof(struct wv_node)); node = (struct wv_node *)WV_ADDR(arena, ref); memset(node, 0, sizeof(struct wv_node)); node->type = type; @@ -50,9 +50,10 @@ void wv_attr_set(struct wv_arena *arena, wv_ref node_ref, struct wv_attr *a; n = (struct wv_node *)WV_ADDR(arena, node_ref); - if (n->type != WV_NODE_ELEMENT) return; + if (n->type != WV_NODE_ELEMENT) + return; - attr_ref = wv_alloc(arena, sizeof(struct wv_attr)); + attr_ref = wv_arena_alloc(arena, sizeof(struct wv_attr)); a = (struct wv_attr *)WV_ADDR(arena, attr_ref); a->key = key_str; -- cgit v1.2.3