summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-01-27 22:05:08 +0000
committerDavid Robillard <d@drobilla.net>2011-01-27 22:05:08 +0000
commit04da598576390d6bf0ed73865b6b3272fdf2840b (patch)
tree15a422f61fd0feea1a68d2652194f8b41c21a189
parent936ba8ae77a77f3d12e9032354edf263629a3d87 (diff)
downloadsord-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
-rw-r--r--src/sord.c10
1 files 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