diff options
author | Philip Van Hoof <pvanhoof@gnome.org> | 2008-06-08 14:37:30 +0000 |
---|---|---|
committer | Philip Van Hoof <pvanhoof@src.gnome.org> | 2008-06-08 14:37:30 +0000 |
commit | 4e811edc68982e298f812e610ff783040440a9f5 (patch) | |
tree | 52ed67d4c1248029a40bb1c744a455d9111bfb43 /tools | |
parent | 13225808392b51b90c37883527dbe2b623f81d47 (diff) | |
download | gobject-introspection-4e811edc68982e298f812e610ff783040440a9f5.tar.gz |
tools/gidlnode.c
2008-06-08 Philip Van Hoof <pvanhoof@gnome.org>
* girepository/girepository.c:
* girepository/gtypelib.c:
* girepository/ginfo.c:
* girepository/ginvoke.c:
* girepository/girepository.h:
* girepository/gtypelib.h:
* girepository/gmetadata.c:
* girepository/Makefile.am:
* girepository/gmetadata.h:
* tools/compiler.c:
* tools/gidlmodule.c:
* tools/gidlnode.c
* tools/generate.c:
* tools/gidlmodule.h:
* tools/gidlparser.c:
Renamed GMetadata to GTypelib
svn path=/trunk/; revision=288
Diffstat (limited to 'tools')
-rw-r--r-- | tools/compiler.c | 24 | ||||
-rw-r--r-- | tools/generate.c | 16 | ||||
-rw-r--r-- | tools/gidlmodule.c | 4 | ||||
-rw-r--r-- | tools/gidlmodule.h | 4 | ||||
-rw-r--r-- | tools/gidlnode.c | 2 | ||||
-rw-r--r-- | tools/gidlparser.c | 2 |
6 files changed, 26 insertions, 26 deletions
diff --git a/tools/compiler.c b/tools/compiler.c index 6ab0fa54..68fc3cae 100644 --- a/tools/compiler.c +++ b/tools/compiler.c @@ -27,7 +27,7 @@ #include "gidlmodule.h" #include "gidlnode.h" #include "gidlparser.h" -#include "gmetadata.h" +#include "gtypelib.h" gboolean raw = FALSE; gboolean no_init = FALSE; @@ -39,7 +39,7 @@ gboolean debug = FALSE; gboolean verbose = FALSE; static gchar * -format_output (GMetadata *metadata) +format_output (GTypelib *metadata) { GString *result; gint i; @@ -49,7 +49,7 @@ format_output (GMetadata *metadata) g_string_append_printf (result, "#include <stdlib.h>\n"); g_string_append_printf (result, "#include <girepository.h>\n\n"); - g_string_append_printf (result, "const unsigned char _G_METADATA[] = \n{"); + g_string_append_printf (result, "const unsigned char _G_TYPELIB[] = \n{"); for (i = 0; i < metadata->len; i++) { @@ -63,7 +63,7 @@ format_output (GMetadata *metadata) } g_string_append_printf (result, "\n};\n\n"); - g_string_append_printf (result, "const gsize _G_METADATA_SIZE = %u;\n\n", + g_string_append_printf (result, "const gsize _G_TYPELIB_SIZE = %u;\n\n", (guint)metadata->len); if (!no_init) @@ -72,8 +72,8 @@ format_output (GMetadata *metadata) "__attribute__((constructor)) void\n" "register_metadata (void)\n" "{\n" - "\tGMetadata *metadata;\n" - "\tmetadata = g_metadata_new_from_const_memory (_G_METADATA, _G_METADATA_SIZE);\n" + "\tGTypelib *metadata;\n" + "\tmetadata = g_typelib_new_from_const_memory (_G_TYPELIB, _G_TYPELIB_SIZE);\n" "\tg_irepository_register (NULL, metadata);\n" "}\n\n"); @@ -83,7 +83,7 @@ format_output (GMetadata *metadata) "{\n" "\tg_irepository_unregister (NULL, \"%s\");\n" "}\n", - g_metadata_get_namespace (metadata)); + g_typelib_get_namespace (metadata)); } return g_string_free (result, FALSE); @@ -91,7 +91,7 @@ format_output (GMetadata *metadata) static void write_out_metadata (gchar *prefix, - GMetadata *metadata) + GTypelib *metadata) { FILE *file; @@ -167,7 +167,7 @@ main (int argc, char ** argv) GError *error = NULL; GList *c, *m, *modules; gint i; - g_metadata_check_sanity (); + g_typelib_check_sanity (); context = g_option_context_new (""); g_option_context_add_main_entries (context, options, NULL); @@ -210,7 +210,7 @@ main (int argc, char ** argv) { GIdlModule *module = m->data; gchar *prefix; - GMetadata *metadata; + GTypelib *metadata; if (mname && strcmp (mname, module->name) != 0) continue; @@ -227,7 +227,7 @@ main (int argc, char ** argv) continue; } - if (!g_metadata_validate (metadata, &error)) + if (!g_typelib_validate (metadata, &error)) g_error ("Invalid metadata for module '%s': %s", module->name, error->message); @@ -237,7 +237,7 @@ main (int argc, char ** argv) prefix = NULL; write_out_metadata (prefix, metadata); - g_metadata_free (metadata); + g_typelib_free (metadata); metadata = NULL; /* when writing to stdout, stop after the first module */ diff --git a/tools/generate.c b/tools/generate.c index 8c5c3b3b..3e057ef1 100644 --- a/tools/generate.c +++ b/tools/generate.c @@ -28,7 +28,7 @@ #include <glib/gstdio.h> #include "girepository.h" -#include "gmetadata.h" +#include "gtypelib.h" /* FIXME: Avoid global */ static gchar *output = NULL; @@ -1103,14 +1103,14 @@ load_metadata (const gchar *filename, GModule *handle; handle = g_module_open (filename, G_MODULE_BIND_LOCAL|G_MODULE_BIND_LAZY); - if (!g_module_symbol (handle, "_G_METADATA", (gpointer *) &metadata)) + if (!g_module_symbol (handle, "_G_TYPELIB", (gpointer *) &metadata)) { g_printerr ("Could not load metadata from '%s': %s\n", filename, g_module_error ()); return NULL; } - if (!g_module_symbol (handle, "_G_METADATA_SIZE", (gpointer *) &metadata_size)) + if (!g_module_symbol (handle, "_G_TYPELIB_SIZE", (gpointer *) &metadata_size)) { g_printerr ("Could not load metadata from '%s': %s\n", filename, g_module_error ()); @@ -1134,7 +1134,7 @@ main (int argc, char *argv[]) GError *error = NULL; gboolean needs_prefix; gint i; - GMetadata *data; + GTypelib *data; GOptionEntry options[] = { { "raw", 0, 0, G_OPTION_ARG_NONE, &raw, "handle raw metadata", NULL }, @@ -1145,7 +1145,7 @@ main (int argc, char *argv[]) g_type_init (); - g_metadata_check_sanity (); + g_typelib_check_sanity (); context = g_option_context_new (""); g_option_context_add_main_entries (context, options, NULL); @@ -1190,10 +1190,10 @@ main (int argc, char *argv[]) else needs_prefix = FALSE; - data = g_metadata_new_from_const_memory (metadata, len); + data = g_typelib_new_from_const_memory (metadata, len); { GError *error = NULL; - if (!g_metadata_validate (data, &error)) { + if (!g_typelib_validate (data, &error)) { g_printerr ("metadata not valid: %s\n", error->message); g_clear_error (&error); } @@ -1201,7 +1201,7 @@ main (int argc, char *argv[]) g_irepository_register (g_irepository_get_default (), data); write_repository (g_irepository_get_default (), needs_prefix); g_irepository_unregister (g_irepository_get_default (), - g_metadata_get_namespace (data)); + g_typelib_get_namespace (data)); if (dlhandle) { diff --git a/tools/gidlmodule.c b/tools/gidlmodule.c index d17a249a..d543346b 100644 --- a/tools/gidlmodule.c +++ b/tools/gidlmodule.c @@ -60,7 +60,7 @@ g_idl_module_free (GIdlModule *module) g_free (module); } -GMetadata * +GTypelib * g_idl_module_build_metadata (GIdlModule *module, GList *modules) { @@ -210,6 +210,6 @@ g_idl_module_build_metadata (GIdlModule *module, metadata = g_realloc (data, offset2); length = header->size = offset2; - return g_metadata_new_from_memory (metadata, length); + return g_typelib_new_from_memory (metadata, length); } diff --git a/tools/gidlmodule.h b/tools/gidlmodule.h index 3564a75f..0814ed51 100644 --- a/tools/gidlmodule.h +++ b/tools/gidlmodule.h @@ -22,7 +22,7 @@ #define __G_IDL_MODULE_H__ #include <glib.h> -#include "gmetadata.h" +#include "gtypelib.h" G_BEGIN_DECLS @@ -40,7 +40,7 @@ GIdlModule *g_idl_module_new (const gchar *name, const gchar *module_filename); void g_idl_module_free (GIdlModule *module); -GMetadata * g_idl_module_build_metadata (GIdlModule *module, +GTypelib * g_idl_module_build_metadata (GIdlModule *module, GList *modules); G_END_DECLS diff --git a/tools/gidlnode.c b/tools/gidlnode.c index 0e240b2b..09f3f072 100644 --- a/tools/gidlnode.c +++ b/tools/gidlnode.c @@ -24,7 +24,7 @@ #include "gidlmodule.h" #include "gidlnode.h" -#include "gmetadata.h" +#include "gtypelib.h" static gulong string_count = 0; static gulong unique_string_count = 0; diff --git a/tools/gidlparser.c b/tools/gidlparser.c index 6a76b2ca..52b3d788 100644 --- a/tools/gidlparser.c +++ b/tools/gidlparser.c @@ -25,7 +25,7 @@ #include <glib.h> #include "gidlmodule.h" #include "gidlnode.h" -#include "gmetadata.h" +#include "gtypelib.h" typedef enum { |