diff options
author | David Robillard <d@drobilla.net> | 2015-08-14 00:57:09 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-08-14 00:57:09 +0000 |
commit | d3fff833545e4c912e8c5517818f9f6f225c0df8 (patch) | |
tree | bfad57841cf817a02a8c6bcdbdc2363c3357d753 /lilv | |
parent | 8468b9a199358d76c2e4d1a0ef836373d5fc08cd (diff) | |
download | lilv-d3fff833545e4c912e8c5517818f9f6f225c0df8.tar.gz lilv-d3fff833545e4c912e8c5517818f9f6f225c0df8.tar.bz2 lilv-d3fff833545e4c912e8c5517818f9f6f225c0df8.zip |
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
Diffstat (limited to 'lilv')
-rw-r--r-- | lilv/lilv.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lilv/lilv.h b/lilv/lilv.h index e907789..27ed6d0 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -101,6 +101,16 @@ typedef void LilvNodes; /**< set<Node>. */ */ /** + 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(). <table> <caption>Example Turtle Tokens</caption> <tr><th>URI</th><td><http://example.org/foo ></td></tr> @@ -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); |