From d3fff833545e4c912e8c5517818f9f6f225c0df8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 14 Aug 2015 00:57:09 +0000 Subject: Add lilv_free() for systems picky about such things. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@5706 a436a847-0d15-0410-975c-d299462d15a1 --- lilv/lilv.h | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'lilv/lilv.h') diff --git a/lilv/lilv.h b/lilv/lilv.h index e907789..27ed6d0 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -100,6 +100,16 @@ typedef void LilvNodes; /**< set. */ @{ */ +/** + Free memory allocated by Lilv. + + This function exists because some systems require memory allocated by a + library to be freed by code in the same library. It is otherwise equivalent + to the standard C free() function. +*/ +LILV_API void +lilv_free(void* ptr); + /** @name Node @{ @@ -119,7 +129,7 @@ lilv_uri_to_path(const char* uri); /** Convert a file URI string to a local path string. For example, "file://foo/bar%20one/baz.ttl" returns "/foo/bar one/baz.ttl". - Return value must be freed by caller. + Return value must be freed by caller with lilv_free(). @param uri The file URI to parse. @param hostname If non-NULL, set to the hostname in the URI, if any. @return `uri` converted to a path, or NULL on failure (URI is not local). @@ -196,7 +206,7 @@ lilv_node_equals(const LilvNode* value, const LilvNode* other); /** Return this value as a Turtle/SPARQL token. - Returned value must be freed by caller with free(). + Returned value must be freed by caller with lilv_free(). @@ -261,7 +271,7 @@ lilv_node_as_string(const LilvNode* value); /** Return the path of a file URI node. Returns NULL if `value` is not a file URI. - Returned value must be freed by caller. + Returned value must be freed by caller with lilv_free(). */ LILV_API char* lilv_node_get_path(const LilvNode* value, char** hostname); -- cgit v1.2.1
Example Turtle Tokens
URI<http://example.org/foo >