diff options
Diffstat (limited to 'include/serd/serd.h')
-rw-r--r-- | include/serd/serd.h | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h index 604b8032..c2c9d52d 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -561,15 +561,23 @@ 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 @@ -580,10 +588,14 @@ 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 |