get type checking for free
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 30 Apr 2003 14:48:26 +0000 (14:48 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Wed, 30 Apr 2003 14:48:26 +0000 (14:48 +0000)
ChangeLog.claws
configure.ac
src/common/plugin.c
src/common/plugin.h

index bb190951853b9b520ee81ee2102907b76abf8cf7..59eb7be98ec9766e0fdbb099933ef612c11ecb69 100644 (file)
@@ -1,3 +1,9 @@
+2003-04-30 [alfons]    0.8.11claws131
+
+       * src/common/plugin.[ch]
+               see? this ANSI C'fication immediately gives us type
+               checking for free.
+
 2003-04-30 [alfons]    0.8.11claws130
 
        * src/common/plugin.[ch]
 2003-04-30 [alfons]    0.8.11claws130
 
        * src/common/plugin.[ch]
index 884e5956454054b4253147ab61feb0e097f6c129..37251be8e9feeaafea2a0dbff190dafa64c23be1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws130
+EXTRA_VERSION=claws131
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 5009ac03a3bdbe57beff74416b361df6f8df861b..95025cd764df705e52b4c09ada0976b41b62b671 100644 (file)
@@ -92,7 +92,7 @@ gint plugin_load(const gchar *filename, gchar **error)
 {
        Plugin *plugin;
        gint (*plugin_init) (gchar **error);
 {
        Plugin *plugin;
        gint (*plugin_init) (gchar **error);
-       gchar *plugin_name, *plugin_desc, *plugin_type;
+       gpointer plugin_name, plugin_desc, plugin_type;
        gint ok;
 
        g_return_val_if_fail(filename != NULL, -1);
        gint ok;
 
        g_return_val_if_fail(filename != NULL, -1);
@@ -111,10 +111,10 @@ gint plugin_load(const gchar *filename, gchar **error)
                return -1;
        }
 
                return -1;
        }
 
-       if (!g_module_symbol(plugin->module, "plugin_name", (gpointer *)&plugin_name) ||
-           !g_module_symbol(plugin->module, "plugin_desc", (gpointer *)&plugin_desc) ||
-           !g_module_symbol(plugin->module, "plugin_type", (gpointer *)&plugin_type) ||
-           !g_module_symbol(plugin->module, "plugin_init", (gpointer *)&plugin_init)) {
+       if (!g_module_symbol(plugin->module, "plugin_name", &plugin_name) ||
+           !g_module_symbol(plugin->module, "plugin_desc", &plugin_desc) ||
+           !g_module_symbol(plugin->module, "plugin_type", &plugin_type) ||
+           !g_module_symbol(plugin->module, "plugin_init", (gpointer *) &plugin_init)) {
                *error = g_strdup(g_module_error());
                g_module_close(plugin->module);
                g_free(plugin);
                *error = g_strdup(g_module_error());
                g_module_close(plugin->module);
                g_free(plugin);
index 638473a45782165f08eab5b26d36641591050134..0b1d636696d3378909fa44e06d535e3ebd3d572a 100644 (file)
@@ -34,8 +34,8 @@ const gchar *plugin_desc      (void);
 gint plugin_load               (const gchar     *filename,
                                 gchar          **error);
 void plugin_unload             (Plugin          *plugin);
 gint plugin_load               (const gchar     *filename,
                                 gchar          **error);
 void plugin_unload             (Plugin          *plugin);
-void plugin_load_all           (void);
-void plugin_unload_all         (void);
+void plugin_load_all           (gchar          *type);
+void plugin_unload_all         (gchar          *type);
 void plugin_save_list          (void);
 
 GSList *plugin_get_list                (void);
 void plugin_save_list          (void);
 
 GSList *plugin_get_list                (void);