diff options
author | David Robillard <d@drobilla.net> | 2007-10-03 22:21:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-03 22:21:16 +0000 |
commit | 47c8ed163b98b307fa4f7412e59760ccff8e630f (patch) | |
tree | ceae86f8a9010aceb1cdd73ee791e1573d21dc29 /src/pluginclass.c | |
parent | 26eede34411b65b484970b2e3524ff7419f58305 (diff) | |
download | lilv-47c8ed163b98b307fa4f7412e59760ccff8e630f.tar.gz lilv-47c8ed163b98b307fa4f7412e59760ccff8e630f.tar.bz2 lilv-47c8ed163b98b307fa4f7412e59760ccff8e630f.zip |
Fix Plugin class related bugs.
git-svn-id: http://svn.drobilla.net/lad/slv2@814 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/pluginclass.c')
-rw-r--r-- | src/pluginclass.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pluginclass.c b/src/pluginclass.c index 6a71680..c41ce79 100644 --- a/src/pluginclass.c +++ b/src/pluginclass.c @@ -25,15 +25,15 @@ SLV2PluginClass -slv2_plugin_class_new(SLV2World world, const char* parent_uri, const char* uri, const char* label) +slv2_plugin_class_new(SLV2World world, const char* parent_uri, const char* uri, const char* label) { SLV2PluginClass plugin_class = (SLV2PluginClass)malloc(sizeof(struct _SLV2PluginClass)); plugin_class->world = world; if (parent_uri) - plugin_class->parent_uri = strdup(parent_uri); + plugin_class->parent_uri = librdf_new_uri(world->world, (const unsigned char*)parent_uri); else plugin_class->parent_uri = NULL; - plugin_class->uri = strdup(uri); + plugin_class->uri = librdf_new_uri(world->world, (const unsigned char*)uri); plugin_class->label = strdup(label); return plugin_class; } @@ -42,8 +42,8 @@ slv2_plugin_class_new(SLV2World world, const char* parent_uri, const char* uri, void slv2_plugin_class_free(SLV2PluginClass plugin_class) { - free(plugin_class->uri); - free(plugin_class->parent_uri); + librdf_free_uri(plugin_class->uri); + librdf_free_uri(plugin_class->parent_uri); free(plugin_class->label); free(plugin_class); } @@ -52,14 +52,14 @@ slv2_plugin_class_free(SLV2PluginClass plugin_class) const char* slv2_plugin_class_get_parent_uri(SLV2PluginClass plugin_class) { - return plugin_class->parent_uri; + return (const char*)librdf_uri_as_string(plugin_class->parent_uri); } const char* slv2_plugin_class_get_uri(SLV2PluginClass plugin_class) { - return plugin_class->uri; + return (const char*)librdf_uri_as_string(plugin_class->uri); } |