aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-12 16:46:29 +0000
committerDavid Robillard <d@drobilla.net>2011-05-12 16:46:29 +0000
commitbc42e1c4d4fc93592b7e08226192acc00ccf37bc (patch)
treee97b59d0c982c42317a8eebd1851d69a2f85879c /serd
parent13a66cb43bcab491f6ae7e1280b035b2522496c8 (diff)
downloadserd-bc42e1c4d4fc93592b7e08226192acc00ccf37bc.tar.gz
serd-bc42e1c4d4fc93592b7e08226192acc00ccf37bc.tar.bz2
serd-bc42e1c4d4fc93592b7e08226192acc00ccf37bc.zip
Use conventional string lengths not including NULL terminator
git-svn-id: http://svn.drobilla.net/serd/trunk@174 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/serd/serd.h b/serd/serd.h
index 5c802a79..4d87c1a3 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -200,8 +200,8 @@ typedef uint32_t SerdNodeFlags;
*/
typedef struct {
const uint8_t* buf; /**< Value string */
- size_t n_bytes; /**< Size in bytes (including null) */
- size_t n_chars; /**< Length in characters */
+ size_t n_bytes; /**< Size in bytes (not including null) */
+ size_t n_chars; /**< Length in characters (not including null)*/
SerdNodeFlags flags; /**< String properties */
SerdType type; /**< Node type */
} SerdNode;
@@ -247,9 +247,9 @@ typedef enum {
/**
UTF-8 strlen.
- @return Length of @c str in characters.
+ @return Length of @c str in characters (except NULL).
@param str A null-terminated UTF-8 string.
- @param n_bytes (Output) Set to the size of @a str in bytes (incl. NULL).
+ @param n_bytes (Output) Set to the size of @a str in bytes (except NULL).
@param flags (Output) Set to the applicable flags.
*/
SERD_API