summaryrefslogtreecommitdiffstats
path: root/src/zix/tree.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-16 22:23:42 +0000
committerDavid Robillard <d@drobilla.net>2012-01-16 22:23:42 +0000
commitbcdb9db57e8f68ba90077a77a4152b72ca6da7ac (patch)
tree72e39dbd9f503827bbb74d311c22456eef918736 /src/zix/tree.c
parentec82c58f79e7555b4dfe9b832099aa8ee240b8ec (diff)
downloadsord-bcdb9db57e8f68ba90077a77a4152b72ca6da7ac.tar.gz
sord-bcdb9db57e8f68ba90077a77a4152b72ca6da7ac.tar.bz2
sord-bcdb9db57e8f68ba90077a77a4152b72ca6da7ac.zip
Support compilation as C++ under MSVC++.
git-svn-id: http://svn.drobilla.net/sord/trunk@194 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/zix/tree.c')
-rw-r--r--src/zix/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zix/tree.c b/src/zix/tree.c
index 066b038..64e6e7c 100644
--- a/src/zix/tree.c
+++ b/src/zix/tree.c
@@ -47,7 +47,7 @@ ZIX_API
ZixTree*
zix_tree_new(bool allow_duplicates, ZixComparator cmp, void* cmp_data)
{
- ZixTree* t = malloc(sizeof(ZixTree));
+ ZixTree* t = (ZixTree*)malloc(sizeof(ZixTree));
t->root = NULL;
t->cmp = cmp;
t->cmp_data = cmp_data;
@@ -287,7 +287,7 @@ zix_tree_insert(ZixTree* t, void* e, ZixTreeIter** ti)
}
// Allocate a new node n
- if (!(n = malloc(sizeof(ZixTreeNode)))) {
+ if (!(n = (ZixTreeNode*)malloc(sizeof(ZixTreeNode)))) {
return ZIX_STATUS_NO_MEM;
}
memset(n, '\0', sizeof(ZixTreeNode));