X-Git-Url: http://pileus.org/git/?p=grits;a=blobdiff_plain;f=src%2Fgis%2Fgis-plugin.c;h=e3d132b0156caee72f29987488d0e2f2a93ed675;hp=6888b484d8dba073cd1cb2fd8577cab6843ccf44;hb=372f8b7c6c2f487508fd345a83b92c709c94baa1;hpb=d066b3335070b50b196a43b54a8753384f9476cb diff --git a/src/gis/gis-plugin.c b/src/gis/gis-plugin.c index 6888b48..e3d132b 100644 --- a/src/gis/gis-plugin.c +++ b/src/gis/gis-plugin.c @@ -107,9 +107,9 @@ GisPlugin *gis_plugins_load(GisPlugins *self, const char *name, return NULL; } - GisPluginConstructor constructor; + gpointer constructor_ptr; // GCC 4.1 fix? gchar *constructor_str = g_strconcat("gis_plugin_", name, "_new", NULL); - if (!g_module_symbol(module, constructor_str, (gpointer*)&constructor)) { + if (!g_module_symbol(module, constructor_str, &constructor_ptr)) { g_warning("Unable to load symbol %s from %s: %s", constructor_str, name, g_module_error()); g_module_close(module); @@ -117,6 +117,7 @@ GisPlugin *gis_plugins_load(GisPlugins *self, const char *name, return NULL; } g_free(constructor_str); + GisPluginConstructor constructor = constructor_ptr; GisPluginStore *store = g_malloc(sizeof(GisPluginStore)); store->name = g_strdup(name);