diff options
author | David Robillard <d@drobilla.net> | 2021-07-22 19:15:24 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-14 19:37:51 -0500 |
commit | 4584e03fce0d702160f8fde910bb3f24647d4036 (patch) | |
tree | 754373f973506f2afeb56d76ab45f688348c6579 /include | |
parent | ca3a7049506cd1ba91326a36fc02a7319657728c (diff) | |
download | serd-4584e03fce0d702160f8fde910bb3f24647d4036.tar.gz serd-4584e03fce0d702160f8fde910bb3f24647d4036.tar.bz2 serd-4584e03fce0d702160f8fde910bb3f24647d4036.zip |
Rename serd_new_simple_node() to serd_new_token()
Things get confusing without a term for this concept (which is roughly "nodes
that are not annoying to construct"), so "token" it is.
Diffstat (limited to 'include')
-rw-r--r-- | include/serd/serd.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index ded613a9..2bda9829 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -600,15 +600,20 @@ typedef enum { } SerdNodeType; /** - Create a new "simple" node that is just a string. + Create a new "token" node that is just a string. - A "simple" node has no associated language or datatype. This can be used to - efficiently create nodes from an already measured string or slice of a - buffer, which avoids a strlen compared to the friendly constructors. + "Token" is just a shorthand used in this API to refer to a node that is not + a typed or tagged literal. This can be used to create URIs, blank nodes, + variables, and simple string literals. + + Note that string literals constructed with this function will have no flags + set, and so will be written as "short" literals (not triple-quoted). To + construct long literals, use the more advanced serd_new_literal() with + #SERD_IS_LONG. */ SERD_API SerdNode* SERD_ALLOCATED -serd_new_simple_node(SerdNodeType type, SerdStringView string); +serd_new_token(SerdNodeType type, SerdStringView string); /// Create a new plain literal string node from `str` SERD_API |