|
From: Kouhei S. <nul...@cl...> - 2014-01-27 12:34:14
|
Kouhei Sutou 2014-01-27 21:33:53 +0900 (Mon, 27 Jan 2014) New Revision: ad3e83bae572ca683a78e89ad1a437cb805bdd22 https://github.com/clear-code/cutter/commit/ad3e83bae572ca683a78e89ad1a437cb805bdd22 Message: Use more meaningful module name for improving C++ integration exception -> cpp-integration The module just processes only C++ exception but it processes stack unwinding for C++ too. So "exception" is misleading name. Modified files: module/loader-customizer/Makefile.am Renamed files: module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c (from module/loader-customizer/cut-exception-loader-customizer-factory.c) module/loader-customizer/cut-cpp-integration-loader-customizer.c (from module/loader-customizer/cut-exception-loader-customizer.c) Modified: module/loader-customizer/Makefile.am (+6 -6) =================================================================== --- module/loader-customizer/Makefile.am 2014-01-26 20:57:02 +0900 (575e9ea) +++ module/loader-customizer/Makefile.am 2014-01-27 21:33:53 +0900 (2755fec) @@ -21,12 +21,12 @@ LIBS = \ $(top_builddir)/cppcutter/libcppcutter.la loader_customizer_module_LTLIBRARIES = \ - exception.la + cpp-integration.la loader_customizer_factory_module_LTLIBRARIES = \ - exception-factory.la + cpp-integration-factory.la -exception_la_SOURCES = \ - cut-exception-loader-customizer.c +cpp_integration_la_SOURCES = \ + cut-cpp-integration-loader-customizer.c -exception_factory_la_SOURCES = \ - cut-exception-loader-customizer-factory.c +cpp_integration_factory_la_SOURCES = \ + cut-cpp-integration-loader-customizer-factory.c Renamed: module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c (+29 -29) 57% =================================================================== --- module/loader-customizer/cut-exception-loader-customizer-factory.c 2014-01-26 20:57:02 +0900 (834062b) +++ module/loader-customizer/cut-cpp-integration-loader-customizer-factory.c 2014-01-27 21:33:53 +0900 (cc91635) @@ -29,41 +29,41 @@ #include <cutter/cut-module-factory.h> #include <cutter/cut-loader-customizer.h> -#define CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY \ - cut_type_exception_loader_customizer_factory -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_FACTORY(obj) \ +#define CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY \ + cut_type_cpp_integration_loader_customizer_factory +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, \ - CutExceptionLoaderCustomizerFactory)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, \ + CutCppIntegrationLoaderCustomizerFactory)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, \ - CutExceptionLoaderCustomizerFactoryClass)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER_FACTORY(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, \ + CutCppIntegrationLoaderCustomizerFactoryClass)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_FACTORY_GET_CLASS(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, \ - CutExceptionLoaderCustomizerFactoryClass)) + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, \ + CutCppIntegrationLoaderCustomizerFactoryClass)) -typedef struct _CutExceptionLoaderCustomizerFactory CutExceptionLoaderCustomizerFactory; -typedef struct _CutExceptionLoaderCustomizerFactoryClass CutExceptionLoaderCustomizerFactoryClass; +typedef struct _CutCppIntegrationLoaderCustomizerFactory CutCppIntegrationLoaderCustomizerFactory; +typedef struct _CutCppIntegrationLoaderCustomizerFactoryClass CutCppIntegrationLoaderCustomizerFactoryClass; -struct _CutExceptionLoaderCustomizerFactory +struct _CutCppIntegrationLoaderCustomizerFactory { CutModuleFactory object; }; -struct _CutExceptionLoaderCustomizerFactoryClass +struct _CutCppIntegrationLoaderCustomizerFactoryClass { CutModuleFactoryClass parent_class; }; -static GType cut_type_exception_loader_customizer_factory = 0; +static GType cut_type_cpp_integration_loader_customizer_factory = 0; static CutModuleFactoryClass *parent_class; static GObject *create (CutModuleFactory *factory); @@ -81,7 +81,7 @@ class_init (CutModuleFactoryClass *klass) } static void -init (CutExceptionLoaderCustomizerFactory *console) +init (CutCppIntegrationLoaderCustomizerFactory *console) { } @@ -89,21 +89,21 @@ static void register_type (GTypeModule *type_module) { static const GTypeInfo info = { - sizeof(CutExceptionLoaderCustomizerFactoryClass), + sizeof(CutCppIntegrationLoaderCustomizerFactoryClass), (GBaseInitFunc)NULL, (GBaseFinalizeFunc)NULL, (GClassInitFunc)class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof(CutExceptionLoaderCustomizerFactory), + sizeof(CutCppIntegrationLoaderCustomizerFactory), 0, (GInstanceInitFunc)init, }; - cut_type_exception_loader_customizer_factory = + cut_type_cpp_integration_loader_customizer_factory = g_type_module_register_type(type_module, CUT_TYPE_MODULE_FACTORY, - "CutExceptionLoaderCustomizerFactory", + "CutCppIntegrationLoaderCustomizerFactory", &info, 0); } @@ -113,10 +113,10 @@ CUT_MODULE_IMPL_INIT (GTypeModule *type_module) GList *registered_types = NULL; register_type(type_module); - if (cut_type_exception_loader_customizer_factory) { + if (cut_type_cpp_integration_loader_customizer_factory) { registered_types = g_list_prepend(registered_types, - (gchar *)g_type_name(cut_type_exception_loader_customizer_factory)); + (gchar *)g_type_name(cut_type_cpp_integration_loader_customizer_factory)); } return registered_types; @@ -130,13 +130,13 @@ CUT_MODULE_IMPL_EXIT (void) G_MODULE_EXPORT GObject * CUT_MODULE_IMPL_INSTANTIATE (const gchar *first_property, va_list var_args) { - return g_object_new_valist(CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER_FACTORY, first_property, var_args); + return g_object_new_valist(CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER_FACTORY, first_property, var_args); } GObject * create (CutModuleFactory *factory) { - return G_OBJECT(cut_loader_customizer_new("exception", + return G_OBJECT(cut_loader_customizer_new("cpp-integration", NULL)); } Renamed: module/loader-customizer/cut-cpp-integration-loader-customizer.c (+29 -29) 67% =================================================================== --- module/loader-customizer/cut-exception-loader-customizer.c 2014-01-26 20:57:02 +0900 (ed01c30) +++ module/loader-customizer/cut-cpp-integration-loader-customizer.c 2014-01-27 21:33:53 +0900 (f97deb6) @@ -30,48 +30,48 @@ #include <cppcutter/cppcut-test.h> #include <cppcutter/cppcut-test-iterator.h> -#define CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER \ - cut_type_exception_loader_customizer -#define CUT_EXCEPTION_LOADER_CUSTOMIZER(obj) \ +#define CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER \ + cut_type_cpp_integration_loader_customizer +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER(obj) \ (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, \ - CutExceptionLoaderCustomizer)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, \ + CutCppIntegrationLoaderCustomizer)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_CAST((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, \ - CutExceptionLoaderCustomizerClass)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, \ + CutCppIntegrationLoaderCustomizerClass)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER(obj) \ (G_TYPE_CHECK_INSTANCE_TYPE((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER)) -#define CUT_IS_EXCEPTION_LOADER_CUSTOMIZER_CLASS(klass) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER)) +#define CUT_IS_CPP_INTEGRATION_LOADER_CUSTOMIZER_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER)) -#define CUT_EXCEPTION_LOADER_CUSTOMIZER_GET_CLASS(obj) \ + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER)) +#define CUT_CPP_INTEGRATION_LOADER_CUSTOMIZER_GET_CLASS(obj) \ (G_TYPE_INSTANCE_GET_CLASS((obj), \ - CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, \ - CutExceptionLoaderCustomizerClass)) + CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, \ + CutCppIntegrationLoaderCustomizerClass)) -typedef struct _CutExceptionLoaderCustomizer CutExceptionLoaderCustomizer; -typedef struct _CutExceptionLoaderCustomizerClass CutExceptionLoaderCustomizerClass; +typedef struct _CutCppIntegrationLoaderCustomizer CutCppIntegrationLoaderCustomizer; +typedef struct _CutCppIntegrationLoaderCustomizerClass CutCppIntegrationLoaderCustomizerClass; -struct _CutExceptionLoaderCustomizer +struct _CutCppIntegrationLoaderCustomizer { CutLoaderCustomizer parent; }; -struct _CutExceptionLoaderCustomizerClass +struct _CutCppIntegrationLoaderCustomizerClass { CutLoaderCustomizerClass parent_class; }; -static GType cut_type_exception_loader_customizer = 0; +static GType cut_type_cpp_integration_loader_customizer = 0; static GObjectClass *parent_class; static void customize (CutLoaderCustomizer *customizer, CutLoader *loader); static void -class_init (CutExceptionLoaderCustomizerClass *klass) +class_init (CutCppIntegrationLoaderCustomizerClass *klass) { CutLoaderCustomizerClass *loader_customizer_class; @@ -82,7 +82,7 @@ class_init (CutExceptionLoaderCustomizerClass *klass) } static void -init (CutExceptionLoaderCustomizer *customizer) +init (CutCppIntegrationLoaderCustomizer *customizer) { } @@ -90,21 +90,21 @@ static void register_type (GTypeModule *type_module) { static const GTypeInfo info = { - sizeof(CutExceptionLoaderCustomizerClass), + sizeof(CutCppIntegrationLoaderCustomizerClass), (GBaseInitFunc)NULL, (GBaseFinalizeFunc)NULL, (GClassInitFunc)class_init, NULL, /* class_finalize */ NULL, /* class_data */ - sizeof(CutExceptionLoaderCustomizer), + sizeof(CutCppIntegrationLoaderCustomizer), 0, (GInstanceInitFunc)init, }; - cut_type_exception_loader_customizer = + cut_type_cpp_integration_loader_customizer = g_type_module_register_type(type_module, CUT_TYPE_LOADER_CUSTOMIZER, - "CutExceptionLoaderCustomizer", + "CutCppIntegrationLoaderCustomizer", &info, 0); } @@ -114,10 +114,10 @@ CUT_MODULE_IMPL_INIT (GTypeModule *type_module) GList *registered_types = NULL; register_type(type_module); - if (cut_type_exception_loader_customizer) { + if (cut_type_cpp_integration_loader_customizer) { registered_types = g_list_prepend(registered_types, - (gchar *)g_type_name(cut_type_exception_loader_customizer)); + (gchar *)g_type_name(cut_type_cpp_integration_loader_customizer)); } return registered_types; @@ -131,7 +131,7 @@ CUT_MODULE_IMPL_EXIT (void) G_MODULE_EXPORT GObject * CUT_MODULE_IMPL_INSTANTIATE (const gchar *first_property, va_list var_args) { - return g_object_new_valist(CUT_TYPE_EXCEPTION_LOADER_CUSTOMIZER, + return g_object_new_valist(CUT_TYPE_CPP_INTEGRATION_LOADER_CUSTOMIZER, first_property, var_args); } |