From 04a5cdf05dec893a35a3e97464d984e9052586aa Mon Sep 17 00:00:00 2001 From: Johan Dahlin Date: Fri, 8 Aug 2008 19:09:17 +0000 Subject: [PATCH] Merge in the gir-compiler branch. Thanks to Philip and Colin for their 2008-08-08 Johan Dahlin * girepository/gtypelib.c (validate_header): * girepository/gtypelib.h: * giscanner/ast.py: * giscanner/girwriter.py: * giscanner/sourcescanner.c (gi_source_symbol_ref), (gi_source_symbol_unref): * tests/array.test: * tests/boxed.test: * tests/constant.test: * tests/enum.test: * tests/errors.test: * tests/function.test: * tests/gobject.test: * tests/interface.test: * tests/invoke/Makefile.am: * tests/invoke/testfns.xml: * tests/object.test: * tests/parser/Makefile.am: * tests/roundtrips.sh: * tests/struct.test: * tests/types.test: * tests/union.test: * tests/xref1.test: * tests/xref2.test: * tools/Makefile.am: * tools/compiler.c (main): * tools/generate.c (write_callable_info), (write_function_info), (write_repository): * tools/gidlmodule.c: * tools/gidlmodule.h: * tools/gidlnode.c: * tools/gidlnode.h: * tools/gidlparser.c: * tools/gidlparser.h: * tools/gidlwriter.c: * tools/gidlwriter.h: * tools/scanner.c (create_node_from_gtype), (create_node_from_ctype), (g_igenerator_process_properties), (g_igenerator_process_signals), (g_igenerator_create_object), (g_igenerator_create_interface), (g_igenerator_create_boxed), (g_igenerator_create_enum), (g_igenerator_create_flags), (g_igenerator_process_function_symbol), (g_igenerator_process_unregistered_struct_typedef), (g_igenerator_process_struct_typedef), (g_igenerator_process_union_typedef), (g_igenerator_process_enum_typedef), (g_igenerator_process_function_typedef), (g_igenerator_process_constant), (g_igenerator_process_symbols), (g_igenerator_add_module), (g_igenerator_add_include_idl): Merge in the gir-compiler branch. Thanks to Philip and Colin for their help. svn path=/trunk/; revision=325 --- girepository/tools/compiler.c | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/girepository/tools/compiler.c b/girepository/tools/compiler.c index 68fc3cae3..4fff88dcf 100644 --- a/girepository/tools/compiler.c +++ b/girepository/tools/compiler.c @@ -24,9 +24,9 @@ #include #include -#include "gidlmodule.h" -#include "gidlnode.h" -#include "gidlparser.h" +#include "girmodule.h" +#include "girnode.h" +#include "girparser.h" #include "gtypelib.h" gboolean raw = FALSE; @@ -179,6 +179,7 @@ main (int argc, char ** argv) logged_levels = logged_levels | G_LOG_LEVEL_DEBUG; if (verbose) logged_levels = logged_levels | G_LOG_LEVEL_MESSAGE; + g_log_set_always_fatal (G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL); g_log_set_default_handler (log_handler, NULL); @@ -189,11 +190,13 @@ main (int argc, char ** argv) return 1; } + g_debug ("[parsing] start"); + modules = NULL; for (i = 0; input[i]; i++) { GList *mods; - mods = g_idl_parse_file (input[i], &error); + mods = g_ir_parse_file (input[i], &error); if (mods == NULL) { @@ -206,9 +209,13 @@ main (int argc, char ** argv) modules = g_list_concat (modules, mods); } + g_debug ("[parsing] done"); + + g_debug ("[building] start"); + for (m = modules; m; m = m->next) { - GIdlModule *module = m->data; + GIrModule *module = m->data; gchar *prefix; GTypelib *metadata; @@ -220,7 +227,10 @@ main (int argc, char ** argv) g_free (module->shared_library); module->shared_library = g_strdup (shlib); } - metadata = g_idl_module_build_metadata (module, modules); + + g_debug ("[building] module %s", module->name); + + metadata = g_ir_module_build_metadata (module, modules); if (metadata == NULL) { g_error ("Failed to build metadata for module '%s'\n", module->name); @@ -248,6 +258,8 @@ main (int argc, char ** argv) break; } } - + + g_debug ("[building] done"); + return 0; }