diff options
Diffstat (limited to 'include/serd/node.h')
-rw-r--r-- | include/serd/node.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/serd/node.h b/include/serd/node.h index cbf5efcc..2f4384bd 100644 --- a/include/serd/node.h +++ b/include/serd/node.h @@ -172,13 +172,21 @@ serd_new_file_uri(SerdStringView path, SerdStringView hostname); @param d The value for the new node. @param frac_digits The maximum number of digits after the decimal place. + @param datatype Datatype of node, or NULL for xsd:decimal. */ SERD_API SerdNode* SERD_ALLOCATED -serd_new_decimal(double d, unsigned frac_digits); +serd_new_decimal(double d, + unsigned frac_digits, + const SerdNode* SERD_NULLABLE datatype); -/// Create a new node by serialising `i` into an xsd:integer string +/** + Create a new node by serialising `i` into an xsd:integer string. + + @param i Integer value to serialise. + @param datatype Datatype of node, or NULL for xsd:integer. +*/ SERD_API SerdNode* SERD_ALLOCATED -serd_new_integer(int64_t i); +serd_new_integer(int64_t i, const SerdNode* SERD_NULLABLE datatype); /** Create a node by serialising `buf` into an xsd:base64Binary string. @@ -189,9 +197,13 @@ serd_new_integer(int64_t i); @param buf Raw binary input data. @param size Size of `buf`. @param wrap_lines Wrap lines at 76 characters to conform to RFC 2045. + @param datatype Datatype of node, or NULL for xsd:base64Binary. */ SERD_API SerdNode* SERD_ALLOCATED -serd_new_blob(const void* SERD_NONNULL buf, size_t size, bool wrap_lines); +serd_new_blob(const void* SERD_NONNULL buf, + size_t size, + bool wrap_lines, + const SerdNode* SERD_NULLABLE datatype); /// Return a deep copy of `node` SERD_API SerdNode* SERD_ALLOCATED |