diff options
author | David Robillard <d@drobilla.net> | 2011-01-27 22:05:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-27 22:05:08 +0000 |
commit | 04da598576390d6bf0ed73865b6b3272fdf2840b (patch) | |
tree | 15a422f61fd0feea1a68d2652194f8b41c21a189 /src/sord.c | |
parent | 936ba8ae77a77f3d12e9032354edf263629a3d87 (diff) | |
download | sord-04da598576390d6bf0ed73865b6b3272fdf2840b.tar.gz sord-04da598576390d6bf0ed73865b6b3272fdf2840b.tar.bz2 sord-04da598576390d6bf0ed73865b6b3272fdf2840b.zip |
`data' => `buf'.
git-svn-id: http://svn.drobilla.net/sord/trunk@8 3d64ff67-21c5-427c-a301-fe4f08042e5a
Diffstat (limited to 'src/sord.c')
-rw-r--r-- | src/sord.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -147,14 +147,14 @@ struct _SordNode { void* user_data; ///< Opaque user data SordNode datatype; ///< Literal data type (ID of a URI node, or 0) const char* lang; ///< Literal language (interned string) - char* data; ///< String value + char* buf; ///< Value (string) }; static unsigned sord_literal_hash(const void* n) { SordNode node = (SordNode)n; - return g_str_hash(node->data) + g_str_hash(node->lang); + return g_str_hash(node->buf) + g_str_hash(node->lang); } static gboolean @@ -176,7 +176,7 @@ sord_node_compare(Sord sord, const SordNode a, const SordNode b) switch ((SordNodeType)a->type) { case SORD_URI: case SORD_BLANK: - return strcmp(a->data, b->data); + return strcmp(a->buf, b->buf); case SORD_LITERAL: // TODO: lang, type return strcmp(sord_node_get_string(a), sord_node_get_string(b)); @@ -760,7 +760,7 @@ sord_new_node(SordNodeType type, const char* data, size_t n_bytes) node->user_data = 0; node->datatype = 0; node->lang = 0; - node->data = g_strdup(data); // TODO: add no-copy option + node->buf = g_strdup(data); // TODO: add no-copy option return node; } @@ -805,7 +805,7 @@ sord_node_get_type(SordNode ref) const char* sord_node_get_string(SordNode ref) { - return ref->data; + return ref->buf; } void |