summaryrefslogtreecommitdiffstats
path: root/src/zix
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-01-08 03:13:15 +0000
committerDavid Robillard <d@drobilla.net>2012-01-08 03:13:15 +0000
commita79fe5a88d0ef9f440fd6b8330a82fb67839fabd (patch)
tree239f3839a3ab40137b1a35e35abc06eb7d1b6aca /src/zix
parent59b7cb60f0dcdd639ee4b130df9cbce3d7ebf04a (diff)
downloadlilv-a79fe5a88d0ef9f440fd6b8330a82fb67839fabd.tar.gz
lilv-a79fe5a88d0ef9f440fd6b8330a82fb67839fabd.tar.bz2
lilv-a79fe5a88d0ef9f440fd6b8330a82fb67839fabd.zip
Add file support to state implementation.
Use cleaner and more consistent names for world URIs. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3918 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/zix')
-rw-r--r--src/zix/common.h2
-rw-r--r--src/zix/tree.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/zix/common.h b/src/zix/common.h
index 052cb7b..c0dffeb 100644
--- a/src/zix/common.h
+++ b/src/zix/common.h
@@ -64,7 +64,7 @@ typedef bool (*ZixEqualFunc)(const void* a, const void* b);
/**
Function to destroy an element.
*/
-typedef void (*ZixDestroyFunc)(const void* ptr);
+typedef void (*ZixDestroyFunc)(void* ptr);
/**@}
*/
diff --git a/src/zix/tree.c b/src/zix/tree.c
index 1189230..d22f438 100644
--- a/src/zix/tree.c
+++ b/src/zix/tree.c
@@ -101,8 +101,10 @@ ZIX_API
void
zix_tree_free(ZixTree* t)
{
- zix_tree_free_rec(t, t->root);
- free(t);
+ if (t) {
+ zix_tree_free_rec(t, t->root);
+ free(t);
+ }
}
size_t