diff options
author | David Robillard <d@drobilla.net> | 2016-03-16 16:54:49 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-11-25 09:21:03 +0100 |
commit | 9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc (patch) | |
tree | 8c1f24ce028b8f0086120c909906dda6efd8e98c /serd | |
parent | 5e60861c65b84ef7569a26920a7ff2401c1e14d0 (diff) | |
download | serd-9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc.tar.gz serd-9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc.tar.bz2 serd-9e9ef4bb215594d607ae146d2fdc17adbfcdd4cc.zip |
Rename SerdChunk to SerdSlice
Diffstat (limited to 'serd')
-rw-r--r-- | serd/serd.h | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/serd/serd.h b/serd/serd.h index ad915f74..4f5501f6 100644 --- a/serd/serd.h +++ b/serd/serd.h @@ -222,12 +222,12 @@ typedef struct { } SerdNode; /** - An unterminated string fragment. + An unterminated immutable slice of a string. */ typedef struct { const char* buf; /**< Start of chunk */ size_t len; /**< Length of chunk in bytes */ -} SerdChunk; +} SerdSlice; /** A mutable buffer in memory. @@ -252,17 +252,17 @@ typedef struct { /** A parsed URI. - This struct directly refers to chunks in other strings, it does not own any + This struct directly refers to slices in other strings, it does not own any memory itself. Thus, URIs can be parsed and/or resolved against a base URI in-place without allocating memory. */ typedef struct { - SerdChunk scheme; /**< Scheme */ - SerdChunk authority; /**< Authority */ - SerdChunk path_base; /**< Path prefix if relative */ - SerdChunk path; /**< Path suffix */ - SerdChunk query; /**< Query */ - SerdChunk fragment; /**< Fragment */ + SerdSlice scheme; /**< Scheme */ + SerdSlice authority; /**< Authority */ + SerdSlice path_base; /**< Path prefix if relative */ + SerdSlice path; /**< Path suffix */ + SerdSlice query; /**< Query */ + SerdSlice fragment; /**< Fragment */ } SerdURI; /** @@ -732,7 +732,7 @@ bool serd_env_qualify(const SerdEnv* env, const SerdNode* uri, SerdNode* prefix, - SerdChunk* suffix); + SerdSlice* suffix); /** Expand `curie`. @@ -744,8 +744,8 @@ SERD_API SerdStatus serd_env_expand(const SerdEnv* env, const SerdNode* curie, - SerdChunk* uri_prefix, - SerdChunk* uri_suffix); + SerdSlice* uri_prefix, + SerdSlice* uri_suffix); /** Expand `node`, which must be a CURIE or URI, to a full URI. @@ -988,7 +988,7 @@ size_t serd_buffer_sink(const void* buf, size_t len, void* stream); /** - Finish a serialisation to a chunk with serd_buffer_sink(). + Finish a serialisation to a buffer with serd_buffer_sink(). The returned string is the result of the serialisation, which is NULL terminated (by this function) and owned by the caller. |