aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd/serd.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-03-15 23:37:09 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 16:27:02 -0500
commitd107eb486f24c0e68eff4e1b622850fca5f75d77 (patch)
treed8c2678be2739467005f5807f331ad4bcfa9790a /include/serd/serd.h
parent1c59b863d8c2c2d7b5531866586baf232c0047a2 (diff)
downloadserd-d107eb486f24c0e68eff4e1b622850fca5f75d77.tar.gz
serd-d107eb486f24c0e68eff4e1b622850fca5f75d77.tar.bz2
serd-d107eb486f24c0e68eff4e1b622850fca5f75d77.zip
Remove useless character counting
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r--include/serd/serd.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 1ac38fcd..851dce1b 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -126,14 +126,12 @@ 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);
/**
@@ -341,12 +339,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`.