aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/node.c6
-rw-r--r--src/node.h6
-rw-r--r--src/reader.c7
-rw-r--r--src/reader.h20
4 files changed, 22 insertions, 17 deletions
diff --git a/src/node.c b/src/node.c
index b0e8f991..65bc6fb6 100644
--- a/src/node.c
+++ b/src/node.c
@@ -119,7 +119,7 @@ serd_node_total_size(const SerdNode* node)
}
SerdNode*
-serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdType type)
+serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdNodeType type)
{
const size_t size = sizeof(SerdNode) + serd_node_pad_size(n_bytes);
SerdNode* node = (SerdNode*)calloc(1, size);
@@ -146,7 +146,7 @@ serd_node_set(SerdNode** dst, const SerdNode* src)
}
static SerdNode*
-serd_new_simple(SerdType type, const char* str)
+serd_new_simple(SerdNodeType type, const char* str)
{
if (!str) {
return NULL;
@@ -643,7 +643,7 @@ serd_new_blob(const void* buf,
return node;
}
-SerdType
+SerdNodeType
serd_node_get_type(const SerdNode* node)
{
return node ? node->type : SERD_NOTHING;
diff --git a/src/node.h b/src/node.h
index bfd9ebf5..53936ca3 100644
--- a/src/node.h
+++ b/src/node.h
@@ -24,7 +24,7 @@
struct SerdNodeImpl {
size_t n_bytes; /**< Size in bytes (not including null) */
SerdNodeFlags flags; /**< Node flags (e.g. string properties) */
- SerdType type; /**< Node type */
+ SerdNodeType type; /**< Node type */
};
static inline char*
@@ -39,7 +39,9 @@ serd_node_buffer_c(const SerdNode* node)
return (const char*)(node + 1);
}
-SerdNode* serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdType type);
+SerdNode*
+serd_node_malloc(size_t n_bytes, SerdNodeFlags flags, SerdNodeType type);
+
void serd_node_set(SerdNode** dst, const SerdNode* src);
size_t serd_node_total_size(const SerdNode* node);
void serd_node_zero_pad(SerdNode* node);
diff --git a/src/reader.c b/src/reader.c
index bc8edd52..ab6b3611 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -75,7 +75,7 @@ blank_id(SerdReader* reader)
SerdNode*
push_node_padded(SerdReader* reader, size_t maxlen,
- SerdType type, const char* str, size_t n_bytes)
+ SerdNodeType type, const char* str, size_t n_bytes)
{
// Push a null byte to ensure the previous node was null terminated
char* terminator = (char*)serd_stack_push(&reader->stack, 1);
@@ -109,7 +109,10 @@ push_node_padded(SerdReader* reader, size_t maxlen,
}
SerdNode*
-push_node(SerdReader* reader, SerdType type, const char* str, size_t n_bytes)
+push_node(SerdReader* reader,
+ SerdNodeType type,
+ const char* str,
+ size_t n_bytes)
{
return push_node_padded(reader, n_bytes, type, str, n_bytes);
}
diff --git a/src/reader.h b/src/reader.h
index 7794526b..8c0efe3a 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -69,16 +69,16 @@ struct SerdReaderImpl {
SerdStatus r_err(SerdReader* reader, SerdStatus st, const char* fmt, ...);
-SerdNode* push_node_padded(SerdReader* reader,
- size_t maxlen,
- SerdType type,
- const char* str,
- size_t n_bytes);
-
-SerdNode* push_node(SerdReader* reader,
- SerdType type,
- const char* str,
- size_t n_bytes);
+SerdNode* push_node_padded(SerdReader* reader,
+ size_t maxlen,
+ SerdNodeType type,
+ const char* str,
+ size_t n_bytes);
+
+SerdNode* push_node(SerdReader* reader,
+ SerdNodeType type,
+ const char* str,
+ size_t n_bytes);
size_t genid_size(SerdReader* reader);
SerdNode* blank_id(SerdReader* reader);