aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-29 19:56:13 -0500
committerDavid Robillard <d@drobilla.net>2022-01-13 15:33:54 -0500
commit9fa93ba7da0983e3a4e810138ae6f7c14751e180 (patch)
tree64e6fc6a9967047591822204e7b7fc6e4c78e8f0 /src
parente04877cdf389fac06f899d4d690af2fcb0d6d2c7 (diff)
downloadserd-9fa93ba7da0983e3a4e810138ae6f7c14751e180.tar.gz
serd-9fa93ba7da0983e3a4e810138ae6f7c14751e180.tar.bz2
serd-9fa93ba7da0983e3a4e810138ae6f7c14751e180.zip
Rename SerdType to SerdNodeType
The old name will be even more ambiguous with the increased scope.
Diffstat (limited to 'src')
-rw-r--r--src/node.c8
-rw-r--r--src/node.h4
-rw-r--r--src/reader.c18
-rw-r--r--src/reader.h15
4 files changed, 24 insertions, 21 deletions
diff --git a/src/node.c b/src/node.c
index 84793386..337507a9 100644
--- a/src/node.c
+++ b/src/node.c
@@ -67,7 +67,7 @@ string_sink(const void* const buf, const size_t len, void* const stream)
}
SerdNode
-serd_node_from_string(SerdType type, const char* const str)
+serd_node_from_string(const SerdNodeType type, const char* const str)
{
if (!str) {
return SERD_NODE_NULL;
@@ -80,9 +80,9 @@ serd_node_from_string(SerdType type, const char* const str)
}
SerdNode
-serd_node_from_substring(const SerdType type,
- const char* const str,
- const size_t len)
+serd_node_from_substring(const SerdNodeType type,
+ const char* const str,
+ const size_t len)
{
if (!str) {
return SERD_NODE_NULL;
diff --git a/src/node.h b/src/node.h
index 60f460dd..1c37c68d 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*
@@ -40,7 +40,7 @@ serd_node_buffer_c(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);
void
serd_node_set(SerdNode** dst, const SerdNode* src);
diff --git a/src/reader.c b/src/reader.c
index 92281149..a0f9f6c1 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -84,11 +84,11 @@ serd_file_read_byte(void* const buf,
}
Ref
-push_node_padded(SerdReader* const reader,
- const size_t maxlen,
- const SerdType type,
- const char* const str,
- const size_t n_bytes)
+push_node_padded(SerdReader* const reader,
+ const size_t maxlen,
+ const SerdNodeType type,
+ const char* const str,
+ const size_t n_bytes)
{
void* mem = serd_stack_push_aligned(
&reader->stack, sizeof(SerdNode) + maxlen + 1, sizeof(SerdNode));
@@ -111,10 +111,10 @@ push_node_padded(SerdReader* const reader,
}
Ref
-push_node(SerdReader* const reader,
- const SerdType type,
- const char* const str,
- const size_t n_bytes)
+push_node(SerdReader* const reader,
+ const SerdNodeType type,
+ const char* const str,
+ const 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 dec01f3b..4896bf80 100644
--- a/src/reader.h
+++ b/src/reader.h
@@ -88,14 +88,17 @@ SerdStatus
r_err(SerdReader* reader, SerdStatus st, const char* fmt, ...);
Ref
-push_node_padded(SerdReader* reader,
- size_t maxlen,
- SerdType type,
- const char* str,
- size_t n_bytes);
+push_node_padded(SerdReader* reader,
+ size_t maxlen,
+ SerdNodeType type,
+ const char* str,
+ size_t n_bytes);
Ref
-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);
SERD_PURE_FUNC size_t
genid_size(const SerdReader* reader);