summaryrefslogtreecommitdiffstats
path: root/src/plugininstance.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-04-20 03:57:41 +0000
committerDavid Robillard <d@drobilla.net>2007-04-20 03:57:41 +0000
commitbe95afee123c169b083049c2f441d3860a12fea0 (patch)
tree78c907f1828bbe8a8521a83313e793c01a989903 /src/plugininstance.c
parentc625507d8a3101742c083dd030cbd1e1e295a9a0 (diff)
downloadlilv-be95afee123c169b083049c2f441d3860a12fea0.tar.gz
lilv-be95afee123c169b083049c2f441d3860a12fea0.tar.bz2
lilv-be95afee123c169b083049c2f441d3860a12fea0.zip
Clean up API, hide more methods that should not be exposed to user.
Document performance of most methods. Clean up and clarify documentation. git-svn-id: http://svn.drobilla.net/lad/slv2@460 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/plugininstance.c')
-rw-r--r--src/plugininstance.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugininstance.c b/src/plugininstance.c
index 6d957b6..013e33c 100644
--- a/src/plugininstance.c
+++ b/src/plugininstance.c
@@ -16,6 +16,8 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#define _XOPEN_SOURCE 500
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -65,7 +67,10 @@ slv2_plugin_instantiate(SLV2Plugin plugin,
// Search for plugin by URI
// FIXME: Kluge to get bundle path (containing directory of binary)
- const char* const bundle_path = strrchr(plugin->binary_uri, '/') + 1;
+ char* bundle_path = strdup(plugin->binary_uri);
+ char* const bundle_path_end = strrchr(bundle_path, '/');
+ if (bundle_path_end)
+ *(bundle_path_end+1) = '\0';
printf("Bundle path: %s\n", bundle_path);
for (uint32_t i=0; 1; ++i) {
@@ -95,6 +100,8 @@ slv2_plugin_instantiate(SLV2Plugin plugin,
break;
}
}
+
+ free(bundle_path);
}
assert(result);