summaryrefslogtreecommitdiffstats
path: root/slv2
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-12-13 04:37:57 +0000
committerDavid Robillard <d@drobilla.net>2008-12-13 04:37:57 +0000
commitc854c1f24f41844f0c95e8943738a820d8a283e5 (patch)
treecd192e47417aa4f6f9369b8f8922fb4af243cfc1 /slv2
parentcfaf7d029da6f66bddfd91c7874d4019c502ea5c (diff)
downloadlilv-c854c1f24f41844f0c95e8943738a820d8a283e5.tar.gz
lilv-c854c1f24f41844f0c95e8943738a820d8a283e5.tar.bz2
lilv-c854c1f24f41844f0c95e8943738a820d8a283e5.zip
Add constructors slv2_value_new_int, slv2_value_new_float, slv2_value_new_string.
Fix slv2_value_get_turtle_token for floats. Nearly complete test coverage for value stuff: 73.5% coverage git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@1858 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2')
-rw-r--r--slv2/value.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/slv2/value.h b/slv2/value.h
index 53bad8c..db447dd 100644
--- a/slv2/value.h
+++ b/slv2/value.h
@@ -33,12 +33,36 @@ extern "C" {
/** Create a new URI value.
*
- * Returned value must be freed by called with slv2_value_free.
+ * Returned value must be freed by caller with slv2_value_free.
*/
SLV2Value
slv2_value_new_uri(SLV2World world, const char* uri);
+/** Create a new string value (with no language).
+ *
+ * Returned value must be freed by caller with slv2_value_free.
+ */
+SLV2Value
+slv2_value_new_string(SLV2World world, const char* str);
+
+
+/** Create a new integer value.
+ *
+ * Returned value must be freed by caller with slv2_value_free.
+ */
+SLV2Value
+slv2_value_new_int(SLV2World world, int val);
+
+
+/** Create a new floating point value.
+ *
+ * Returned value must be freed by caller with slv2_value_free.
+ */
+SLV2Value
+slv2_value_new_float(SLV2World world, float val);
+
+
/** Free an SLV2Value.
*/
void