diff options
Diffstat (limited to 'src/pluginclass.c')
-rw-r--r-- | src/pluginclass.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/pluginclass.c b/src/pluginclass.c index b3323a0..0ac9d05 100644 --- a/src/pluginclass.c +++ b/src/pluginclass.c @@ -30,15 +30,12 @@ SLV2PluginClass slv2_plugin_class_new(SLV2World world, librdf_uri* parent_uri, librdf_uri* uri, const char* label) { - SLV2PluginClass plugin_class = (SLV2PluginClass)malloc(sizeof(struct _SLV2PluginClass)); - plugin_class->world = world; - if (parent_uri) - plugin_class->parent_uri = slv2_value_new_librdf_uri(world, parent_uri); - else - plugin_class->parent_uri = NULL; - plugin_class->uri = slv2_value_new_librdf_uri(world, uri); - plugin_class->label = slv2_value_new(world, SLV2_VALUE_STRING, label); - return plugin_class; + SLV2PluginClass pc = (SLV2PluginClass)malloc(sizeof(struct _SLV2PluginClass)); + pc->world = world; + pc->parent_uri = (parent_uri ? slv2_value_new_librdf_uri(world, parent_uri) : NULL); + pc->uri = slv2_value_new_librdf_uri(world, uri); + pc->label = slv2_value_new(world, SLV2_VALUE_STRING, label); + return pc; } |