Browse Source

Add LSUP_DEF_NSM macro.

Stefano Cossu 3 years ago
parent
commit
fd1746dd1c
3 changed files with 10 additions and 2 deletions
  1. 1 0
      TODO.md
  2. 4 0
      include/namespace.h
  3. 5 2
      include/term.h

+ 1 - 0
TODO.md

@@ -22,6 +22,7 @@
     - *D* Subclass term types
 - *D* Namespaced IRIs
 - *D* Relative IRIs
+- *P* Atomic multi-graph updates
 - *P* Turtle serialization / deserialization
 - *P* Full UTF-8 support
 - *P* Extended tests

+ 4 - 0
include/namespace.h

@@ -7,6 +7,10 @@
  */
 #define PFX_LEN 8
 
+/** @brief Default namespace. Only available upon environment initialization.
+ */
+#define LSUP_DEF_NSM LSUP_default_env->nsm
+
 
 /** @brief Namespace map structure.
  *

+ 5 - 2
include/term.h

@@ -367,6 +367,9 @@ LSUP_iriref_frag (const LSUP_Term *iri);
  */
 
 /** @brief Create a new triple from three terms.
+ *
+ * Terms are NOT copied. To free them with the triple, use #LSUP_triple_free().
+ * To only free the triple, use free().
  *
  * TODO Term types are not validated at the moment.
  *
@@ -396,8 +399,8 @@ LSUP_triple_serialize (const LSUP_Triple *spo);
 
 /** @brief Initialize internal term pointers in a heap-allocated triple.
  *
- * NOTE: the term structures are not copied. If the triple is freed with
- * #LSUP_triple_free(), the originally provided terms are freed too.
+ * Terms are NOT copied. To free them with the triple, use #LSUP_triple_free().
+ * To only free the triple, use free().
  *
  * @param spo[in] Triple pointer to initialize.
  */