diff options
Diffstat (limited to 'src/pluginclass.c')
-rw-r--r-- | src/pluginclass.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/pluginclass.c b/src/pluginclass.c index 6f73083..910375c 100644 --- a/src/pluginclass.c +++ b/src/pluginclass.c @@ -35,12 +35,13 @@ slv2_plugin_class_new(SLV2World world, const char* label) { assert(!parent_node || librdf_node_is_resource(parent_node)); - librdf_uri* parent_uri = parent_node ? librdf_node_get_uri(parent_node) : NULL; SLV2PluginClass pc = (SLV2PluginClass)malloc(sizeof(struct _SLV2PluginClass)); - pc->world = world; - pc->parent_uri = (parent_uri ? slv2_value_new_librdf_uri(world, parent_node) : NULL); - pc->uri = slv2_value_new_librdf_uri(world, uri); - pc->label = slv2_value_new(world, SLV2_VALUE_STRING, label); + pc->world = world; + pc->uri = slv2_value_new_librdf_uri(world, uri); + pc->label = slv2_value_new(world, SLV2_VALUE_STRING, label); + pc->parent_uri = (parent_node) + ? slv2_value_new_librdf_uri(world, parent_node) + : NULL; return pc; } |