summaryrefslogtreecommitdiffstats
path: root/zix/patree.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-10-18 20:07:52 +0200
committerDavid Robillard <d@drobilla.net>2019-10-18 20:15:53 +0200
commit92e2833403321fe630b22ccdeb00a31fec7785aa (patch)
treeaf69201d4ae1d02ce3e57fc179cbbfe6cda4feb7 /zix/patree.c
parent7f9f0d2b6e7ac33e5b2cc5060481a2cc1d429a7d (diff)
downloadzix-92e2833403321fe630b22ccdeb00a31fec7785aa.tar.gz
zix-92e2833403321fe630b22ccdeb00a31fec7785aa.tar.bz2
zix-92e2833403321fe630b22ccdeb00a31fec7785aa.zip
Fix building as C++
Diffstat (limited to 'zix/patree.c')
-rw-r--r--zix/patree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/zix/patree.c b/zix/patree.c
index fe552d8..f984005 100644
--- a/zix/patree.c
+++ b/zix/patree.c
@@ -122,7 +122,7 @@ zix_patree_new(void)
{
ZixPatree* t = (ZixPatree*)calloc(1, sizeof(ZixPatree));
- t->root = calloc(1, sizeof(ZixPatreeNode));
+ t->root = (ZixPatreeNode*)calloc(1, sizeof(ZixPatreeNode));
return t;
}
@@ -196,7 +196,7 @@ patree_add_edge(ZixPatreeNode** n_ptr,
*zix_patree_get_child_ptr(n, n->n_children - 1) = child;
#else
const n_edges_t l = zix_trie_find_key(n->children, n->n_children, first[0]);
- ZixPatreeNode* m = malloc(zix_patree_node_size(n->n_children + 1));
+ ZixPatreeNode* m = (ZixPatreeNode*)malloc(zix_patree_node_size(n->n_children + 1));
m->label_first = n->label_first;
m->label_last = n->label_last;
m->str = n->str;