diff options
author | David Robillard <d@drobilla.net> | 2016-03-15 23:37:09 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:58 +0100 |
commit | 9e5fa742b6ef66a546c0a77c14f834f2268c5f71 (patch) | |
tree | 7a731e98d4519b66a7fac3bb686f098f2987f88d /serd | |
parent | c63451092692c251cab874475d3540408ed5d8c2 (diff) | |
download | serd-9e5fa742b6ef66a546c0a77c14f834f2268c5f71.tar.gz serd-9e5fa742b6ef66a546c0a77c14f834f2268c5f71.tar.bz2 serd-9e5fa742b6ef66a546c0a77c14f834f2268c5f71.zip |
Remove useless character counting
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/serd/serd.h b/serd/serd.h index 08a5e151..ca133b96 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -220,7 +220,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; @@ -310,14 +309,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. @@ -465,7 +463,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`. |