diff options
Diffstat (limited to 'wv_dom.c')
| -rw-r--r-- | wv_dom.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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; |
