From 04da598576390d6bf0ed73865b6b3272fdf2840b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 27 Jan 2011 22:05:08 +0000 Subject: `data' => `buf'. git-svn-id: http://svn.drobilla.net/sord/trunk@8 3d64ff67-21c5-427c-a301-fe4f08042e5a --- src/sord.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sord.c b/src/sord.c index bb8abbb..a720dae 100644 --- a/src/sord.c +++ b/src/sord.c @@ -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 -- cgit v1.2.1