From 9f6becfdd80dfe4cf1d99d0aefa8b257eb1b0c8d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 11 May 2011 22:57:00 +0000 Subject: Preserve serd node flags for pretty serialisation. git-svn-id: http://svn.drobilla.net/sord/trunk@107 3d64ff67-21c5-427c-a301-fe4f08042e5a --- sord/sord.h | 11 +++++++++-- sord/sordmm.hpp | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'sord') diff --git a/sord/sord.h b/sord/sord.h index 8159170..68c0289 100644 --- a/sord/sord.h +++ b/sord/sord.h @@ -209,8 +209,8 @@ sord_new_literal_counted(SordWorld* world, SordNode* datatype, const uint8_t* str, size_t str_len, - const char* lang, - uint8_t lang_len); + SerdNodeFlags flags, + const char* lang); /** Copy a node (i.e. obtain a reference). @@ -264,6 +264,13 @@ SORD_API SordNode* sord_node_get_datatype(const SordNode* node); +/** + Return the flags (string attributes) of a node. +*/ +SORD_API +SerdNodeFlags +sord_node_get_flags(const SordNode* node); + /** Return true iff @c a is equal to @c b. diff --git a/sord/sordmm.hpp b/sord/sordmm.hpp index 5345b92..d37d6e5 100644 --- a/sord/sordmm.hpp +++ b/sord/sordmm.hpp @@ -67,7 +67,7 @@ public: static inline SerdNode string_to_node(SerdType type, const std::string& s) { SerdNode ret = { - (const uint8_t*)s.c_str(), s.length() + 1, s.length(), type }; + (const uint8_t*)s.c_str(), s.length() + 1, s.length(), 0, type }; return ret; } -- cgit v1.2.1