diff options
author | David Robillard <d@drobilla.net> | 2013-02-18 17:48:58 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-02-18 17:48:58 +0000 |
commit | 131f6f4456a639fed721df603f0e0c722adc8e91 (patch) | |
tree | 0201fda485055a90cdf1c89c8d0e8c551dd13b6c /src | |
parent | 1f7c6726ab0ed34bdb4b25884b396563fab05b99 (diff) | |
download | sord-131f6f4456a639fed721df603f0e0c722adc8e91.tar.gz sord-131f6f4456a639fed721df603f0e0c722adc8e91.tar.bz2 sord-131f6f4456a639fed721df603f0e0c722adc8e91.zip |
Fix reference counting semantics of sord_get().
git-svn-id: http://svn.drobilla.net/sord/trunk@286 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src')
-rw-r--r-- | src/sord.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -844,7 +844,7 @@ sord_search(SordModel* model, return sord_find(model, pat); } -const SordNode* +SordNode* sord_get(SordModel* model, const SordNode* s, const SordNode* p, @@ -855,14 +855,14 @@ sord_get(SordModel* model, return NULL; } - SordIter* i = sord_search(model, s, p, o, g); - const SordNode* ret = NULL; + SordIter* i = sord_search(model, s, p, o, g); + SordNode* ret = NULL; if (!s) { - ret = sord_iter_get_node(i, SORD_SUBJECT); + ret = sord_node_copy(sord_iter_get_node(i, SORD_SUBJECT)); } else if (!p) { - ret = sord_iter_get_node(i, SORD_PREDICATE); + ret = sord_node_copy(sord_iter_get_node(i, SORD_PREDICATE)); } else if (!o) { - ret = sord_iter_get_node(i, SORD_OBJECT); + ret = sord_node_copy(sord_iter_get_node(i, SORD_OBJECT)); } sord_iter_free(i); |