aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-03-15 23:37:09 -0400
committerDavid Robillard <d@drobilla.net>2019-04-13 19:15:32 +0200
commit2a480d8cc56fe4d29fba2759b62d9f09fc0cc87e (patch)
tree3a8e1574df9fd422e3f9118dffd00efdfd3a9ee8 /serd
parenta549e968cd3f840dc98b2e199c5f52e9f5a5780c (diff)
downloadserd-2a480d8cc56fe4d29fba2759b62d9f09fc0cc87e.tar.gz
serd-2a480d8cc56fe4d29fba2759b62d9f09fc0cc87e.tar.bz2
serd-2a480d8cc56fe4d29fba2759b62d9f09fc0cc87e.zip
Remove useless character counting
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/serd/serd.h b/serd/serd.h
index a24f3a36..ddfc39f9 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -216,7 +216,6 @@ typedef uint32_t SerdNodeFlags;
typedef struct {
const uint8_t* buf; /**< Value string */
size_t n_bytes; /**< Size in bytes (not including null) */
- size_t n_chars; /**< Length in characters (not including null)*/
SerdNodeFlags flags; /**< Node flags (e.g. string properties) */
SerdType type; /**< Node type */
} SerdNode;
@@ -306,14 +305,13 @@ serd_strerror(SerdStatus status);
/**
Measure a UTF-8 string.
- @return Length of `str` in characters (except NULL).
+ @return Length of `str` in bytes.
@param str A null-terminated UTF-8 string.
- @param n_bytes (Output) Set to the size of `str` in bytes (except NULL).
@param flags (Output) Set to the applicable flags.
*/
SERD_API
size_t
-serd_strlen(const uint8_t* str, size_t* n_bytes, SerdNodeFlags* flags);
+serd_strlen(const uint8_t* str, SerdNodeFlags* flags);
/**
Parse a string to a double.
@@ -461,7 +459,7 @@ serd_uri_serialise_relative(const SerdURI* uri,
@{
*/
-static const SerdNode SERD_NODE_NULL = { NULL, 0, 0, 0, SERD_NOTHING };
+static const SerdNode SERD_NODE_NULL = { NULL, 0, 0, SERD_NOTHING };
/**
Make a (shallow) node from `str`.