From 3bf99421c04fdcc789745b7c59fc9bee8edce06b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 15 Mar 2016 23:37:09 -0400 Subject: Remove useless character counting --- include/serd/serd.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'include/serd/serd.h') diff --git a/include/serd/serd.h b/include/serd/serd.h index 189592de..773574f0 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -140,15 +140,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* SERD_NONNULL str, - size_t* SERD_NULLABLE n_bytes, SerdNodeFlags* SERD_NULLABLE flags); /** @@ -363,12 +361,11 @@ typedef enum { typedef struct { const uint8_t* SERD_NULLABLE buf; ///< Value string size_t n_bytes; ///< Size in bytes (excluding null) - size_t n_chars; ///< String length (excluding null) SerdNodeFlags flags; ///< Node flags (string properties) SerdType type; ///< Node type } SerdNode; -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`. -- cgit v1.2.1