summaryrefslogtreecommitdiffstats
path: root/sord
diff options
context:
space:
mode:
Diffstat (limited to 'sord')
-rw-r--r--sord/sord.h11
-rw-r--r--sord/sordmm.hpp2
2 files changed, 10 insertions, 3 deletions
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).
@@ -265,6 +265,13 @@ 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.
Note this is much faster than comparing the node's strings.
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;
}