Hiroyuki Ikezoe
ikezo****@users*****
2006年 11月 29日 (水) 08:52:52 JST
Index: tomoe/lib/tomoe-dict-loader.c diff -u tomoe/lib/tomoe-dict-loader.c:1.1 tomoe/lib/tomoe-dict-loader.c:1.2 --- tomoe/lib/tomoe-dict-loader.c:1.1 Wed Nov 29 00:07:02 2006 +++ tomoe/lib/tomoe-dict-loader.c Wed Nov 29 08:52:52 2006 @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: tomoe-dict-loader.c,v 1.1 2006/11/28 15:07:02 kous Exp $ + * $Id: tomoe-dict-loader.c,v 1.2 2006/11/28 23:52:52 ikezoe Exp $ */ #include <stdlib.h> @@ -66,13 +66,13 @@ if (!tomoe_module_load_func (loader->module, G_STRINGIFY (TOMOE_DICT_IMPL_INIT), - (gpointer *)&loader->init) || + (gpointer )&loader->init) || !tomoe_module_load_func (loader->module, G_STRINGIFY (TOMOE_DICT_IMPL_EXIT), - (gpointer *)&loader->exit) || + (gpointer )&loader->exit) || !tomoe_module_load_func (loader->module, G_STRINGIFY (TOMOE_DICT_IMPL_INSTANTIATE), - (gpointer *)&loader->instantiate)) + (gpointer )&loader->instantiate)) { tomoe_module_close (loader->module); loader->module = NULL; @@ -157,8 +157,8 @@ tomoe_dict_loader_unload (void) { g_list_foreach (dicts, (GFunc) g_object_unref, NULL); - g_free (dicts); - dicts = NULL; + g_free (dicts); + dicts = NULL; } TomoeDict * @@ -171,7 +171,7 @@ TomoeDictLoader *loader = node->data; if (g_type_module_use (G_TYPE_MODULE (loader))) { - TomoeDict *dict; + TomoeDict *dict = NULL; if (tomoe_module_match_name (loader->module, name)) { dict = loader->instantiate (filename, editable); } Index: tomoe/lib/tomoe-module.h diff -u tomoe/lib/tomoe-module.h:1.3 tomoe/lib/tomoe-module.h:1.4 --- tomoe/lib/tomoe-module.h:1.3 Wed Nov 29 00:07:02 2006 +++ tomoe/lib/tomoe-module.h Wed Nov 29 08:52:52 2006 @@ -17,12 +17,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: tomoe-module.h,v 1.3 2006/11/28 15:07:02 kous Exp $ - */ - -/** - * @file tomoe-module.h - * @brief Provide a set of API to load shared library dynamically. + * $Id: tomoe-module.h,v 1.4 2006/11/28 23:52:52 ikezoe Exp $ */ #ifndef __TOMOE_MODULE_H__ Index: tomoe/lib/tomoe-recognizer-loader.c diff -u tomoe/lib/tomoe-recognizer-loader.c:1.1 tomoe/lib/tomoe-recognizer-loader.c:1.2 --- tomoe/lib/tomoe-recognizer-loader.c:1.1 Wed Nov 29 00:07:02 2006 +++ tomoe/lib/tomoe-recognizer-loader.c Wed Nov 29 08:52:52 2006 @@ -17,7 +17,7 @@ * Free Software Foundation, Inc., 59 Temple Place, Suite 330, * Boston, MA 02111-1307 USA * - * $Id: tomoe-recognizer-loader.c,v 1.1 2006/11/28 15:07:02 kous Exp $ + * $Id: tomoe-recognizer-loader.c,v 1.2 2006/11/28 23:52:52 ikezoe Exp $ */ #include <stdlib.h> @@ -66,14 +66,13 @@ if (!tomoe_module_load_func (loader->module, G_STRINGIFY (TOMOE_RECOGNIZER_IMPL_INIT), - (gpointer *)&loader->init) || + (gpointer )&loader->init) || !tomoe_module_load_func (loader->module, G_STRINGIFY (TOMOE_RECOGNIZER_IMPL_EXIT), - (gpointer *)&loader->exit) || + (gpointer )&loader->exit) || !tomoe_module_load_func (loader->module, G_STRINGIFY (TOMOE_RECOGNIZER_IMPL_INSTANTIATE), - (gpointer *)&loader->instantiate)) - { + (gpointer )&loader->instantiate)) { tomoe_module_close (loader->module); loader->module = NULL; return FALSE; @@ -172,7 +171,7 @@ TomoeRecognizerLoader *loader = node->data; if (g_type_module_use (G_TYPE_MODULE (loader))) { - TomoeRecognizer *recognizer; + TomoeRecognizer *recognizer = NULL; if (tomoe_module_match_name (loader->module, name)) { recognizer = loader->instantiate (); }