diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2010-05-17 00:28:23 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2010-05-17 00:28:23 (GMT) |
commit | 7adb4243ad629554e496de173977721a8a5d0110 (patch) | |
tree | 18f50fcdab35e057b3a1a10e7e0c1f141e89eb39 /src/plugins/plugin.c | |
parent | 118a668adbf6ca9d4c549618e54f58330f46ce58 (diff) |
Given more details for each operand relative to one DEX pool.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@156 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/plugins/plugin.c')
-rw-r--r-- | src/plugins/plugin.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/plugins/plugin.c b/src/plugins/plugin.c index 42bef63..2443768 100644 --- a/src/plugins/plugin.c +++ b/src/plugins/plugin.c @@ -41,7 +41,7 @@ static void g_plugin_module_init(GPluginModule *); -/* Indique le type définit pour un greffon. */ +/* Indique le type défini pour un greffon. */ G_DEFINE_TYPE(GPluginModule, g_plugin_module, G_TYPE_OBJECT); @@ -98,7 +98,8 @@ static void g_plugin_module_init(GPluginModule *line) GPluginModule *g_plugin_module_new(const gchar *filename, GObject *ref) { GPluginModule *result; /* Structure à retourner */ - get_plugin_action_fc __get_action; /* Actions du greffon */ + get_plugin_action_fc __get_type; /* Type(s) de greffon */ + get_plugin_action_fc __get_action; /* Actions du greffon */ result = g_object_new(G_TYPE_PLUGIN_MODULE, NULL); @@ -107,6 +108,21 @@ GPluginModule *g_plugin_module_new(const gchar *filename, GObject *ref) result->module = g_module_open(filename, G_MODULE_BIND_LAZY); + + if (!g_module_symbol(result->module, "get_plugin_type", (gpointer *)&__get_type)) + { + printf("No 'get_plugin_type' symbol found in the plugin '%s'\n", filename); + goto bad_plugin; + } + + result->type = __get_type(); + + + printf("Plugin type :: 0x%08x\n", result->type); + + + + #if 1 if (!g_module_symbol(result->module, "get_plugin_action", (gpointer *)&__get_action)) { @@ -148,6 +164,13 @@ GPluginModule *g_plugin_module_new(const gchar *filename, GObject *ref) return result; + + bad_plugin: + + g_object_unref(G_OBJECT(result)); + + return NULL; + } |