[gobject-introspection] girepository: Consistently prefix internal functions with _
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gobject-introspection] girepository: Consistently prefix internal functions with _
- Date: Tue, 16 Nov 2010 22:07:14 +0000 (UTC)
commit c5cf4ecb0a393af0c9c7cd68859a2e481b6586d2
Author: Colin Walters <walters verbum org>
Date: Tue Nov 16 15:08:33 2010 -0500
girepository: Consistently prefix internal functions with _
This should better avoid them being exported. Rename
girepository-parser.la to girepository-internals.la for clarity.
Makefile-girepository.am | 26 ++--
Makefile-tools.am | 4 +-
girepository/girmodule.c | 58 ++++----
girepository/girmodule.h | 16 +-
girepository/girnode.c | 346 ++++++++++++++++++++++----------------------
girepository/girnode.h | 46 +++---
girepository/giroffsets.c | 14 +-
girepository/girparser.c | 96 ++++++------
girepository/girparser.h | 28 ++--
tools/compiler.c | 10 +-
10 files changed, 322 insertions(+), 322 deletions(-)
---
diff --git a/Makefile-girepository.am b/Makefile-girepository.am
index 35123f5..9a69fe3 100644
--- a/Makefile-girepository.am
+++ b/Makefile-girepository.am
@@ -23,7 +23,19 @@ girepo_HEADERS = \
girepository/givfuncinfo.h
lib_LTLIBRARIES += libgirepository-1.0.la
-noinst_LTLIBRARIES += libgirepository-parser.la
+noinst_LTLIBRARIES += libgirepository-internals.la
+
+libgirepository_internals_la_SOURCES = \
+ girepository/girmodule.c \
+ girepository/girmodule.h \
+ girepository/girnode.c \
+ girepository/girnode.h \
+ girepository/giroffsets.c \
+ girepository/girparser.c \
+ girepository/girparser.h \
+ girepository/girwriter.c \
+ girepository/girwriter.h
+libgirepository_internals_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
libgirepository_1_0_la_SOURCES = \
girepository/gdump.c \
@@ -57,17 +69,5 @@ libgirepository_1_0_la_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
libgirepository_1_0_la_LIBADD = $(GIREPO_LIBS)
libgirepository_1_0_la_LDFLAGS = -no-undefined -version-number 1:0:0 -export-symbols-regex '^gi?_'
-libgirepository_parser_la_SOURCES = \
- girepository/girmodule.c \
- girepository/girmodule.h \
- girepository/girnode.c \
- girepository/girnode.h \
- girepository/giroffsets.c \
- girepository/girparser.c \
- girepository/girparser.h \
- girepository/girwriter.c \
- girepository/girwriter.h
-libgirepository_parser_la_CFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
-
gdumpdir = $(datadir)/gobject-introspection-1.0/
gdump_DATA = girepository/gdump.c
diff --git a/Makefile-tools.am b/Makefile-tools.am
index d57ccde..31e6e71 100644
--- a/Makefile-tools.am
+++ b/Makefile-tools.am
@@ -15,7 +15,7 @@ g_ir_compiler_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
-I$(top_srcdir)/girepository
g_ir_compiler_CFLAGS = $(GIO_CFLAGS)
g_ir_compiler_LDADD = \
- libgirepository-parser.la \
+ libgirepository-internals.la \
libgirepository-1.0.la \
$(GIREPO_LIBS)
@@ -24,7 +24,7 @@ g_ir_generate_CPPFLAGS = -DGIREPO_DEFAULT_SEARCH_PATH="\"$(libdir)\"" \
-I$(top_srcdir)/girepository
g_ir_generate_CFLAGS = $(GIO_CFLAGS)
g_ir_generate_LDADD = \
- libgirepository-parser.la \
+ libgirepository-internals.la \
libgirepository-1.0.la \
$(GIREPO_LIBS)
diff --git a/girepository/girmodule.c b/girepository/girmodule.c
index 68ee64b..d15b940 100644
--- a/girepository/girmodule.c
+++ b/girepository/girmodule.c
@@ -30,10 +30,10 @@
GIrModule *
-g_ir_module_new (const gchar *name,
- const gchar *version,
- const gchar *shared_library,
- const gchar *c_prefix)
+_g_ir_module_new (const gchar *name,
+ const gchar *version,
+ const gchar *shared_library,
+ const gchar *c_prefix)
{
GIrModule *module;
@@ -56,14 +56,14 @@ g_ir_module_new (const gchar *name,
}
void
-g_ir_module_free (GIrModule *module)
+_g_ir_module_free (GIrModule *module)
{
GList *e;
g_free (module->name);
for (e = module->entries; e; e = e->next)
- g_ir_node_free ((GIrNode *)e->data);
+ _g_ir_node_free ((GIrNode *)e->data);
g_list_free (module->entries);
/* Don't free dependencies, we inherit that from the parser */
@@ -77,7 +77,7 @@ g_ir_module_free (GIrModule *module)
}
/**
- * g_ir_module_fatal:
+ * _g_ir_module_fatal:
* @build: Current build
* @line: Origin line number, or 0 if unknown
* @msg: printf-format string
@@ -86,10 +86,10 @@ g_ir_module_free (GIrModule *module)
* Report a fatal error, then exit.
*/
void
-g_ir_module_fatal (GIrTypelibBuild *build,
- guint line,
- const char *msg,
- ...)
+_g_ir_module_fatal (GIrTypelibBuild *build,
+ guint line,
+ const char *msg,
+ ...)
{
GString *context;
char *formatted;
@@ -149,8 +149,8 @@ add_disguised_structure_foreach (gpointer key,
}
void
-g_ir_module_add_include_module (GIrModule *module,
- GIrModule *include_module)
+_g_ir_module_add_include_module (GIrModule *module,
+ GIrModule *include_module)
{
module->include_modules = g_list_prepend (module->include_modules,
include_module);
@@ -184,8 +184,8 @@ write_attribute (gpointer key, gpointer value, gpointer datap)
*(data->offset) += sizeof (AttributeBlob);
blob->offset = data->node->offset;
- blob->name = write_string ((const char*) key, data->strings, data->databuf, data->offset2);
- blob->value = write_string ((const char*) value, data->strings, data->databuf, data->offset2);
+ blob->name = _g_ir_write_string ((const char*) key, data->strings, data->databuf, data->offset2);
+ blob->value = _g_ir_write_string ((const char*) value, data->strings, data->databuf, data->offset2);
data->count++;
}
@@ -222,7 +222,7 @@ node_cmp_offset_func (gconstpointer a,
GITypelib *
-g_ir_module_build_typelib (GIrModule *module)
+_g_ir_module_build_typelib (GIrModule *module)
{
GError *error = NULL;
GITypelib *typelib;
@@ -286,7 +286,7 @@ g_ir_module_build_typelib (GIrModule *module)
{
GIrNode *node = e->data;
- size += g_ir_node_get_full_size (node);
+ size += _g_ir_node_get_full_size (node);
/* Also reset the offset here */
node->offset = 0;
@@ -320,17 +320,17 @@ g_ir_module_build_typelib (GIrModule *module)
* the size calculations above.
*/
if (dependencies != NULL)
- header->dependencies = write_string (dependencies, strings, data, &header_size);
+ header->dependencies = _g_ir_write_string (dependencies, strings, data, &header_size);
else
header->dependencies = 0;
header->size = 0; /* filled in later */
- header->namespace = write_string (module->name, strings, data, &header_size);
- header->nsversion = write_string (module->version, strings, data, &header_size);
+ header->namespace = _g_ir_write_string (module->name, strings, data, &header_size);
+ header->nsversion = _g_ir_write_string (module->version, strings, data, &header_size);
header->shared_library = (module->shared_library?
- write_string (module->shared_library, strings, data, &header_size)
+ _g_ir_write_string (module->shared_library, strings, data, &header_size)
: 0);
if (module->c_prefix != NULL)
- header->c_prefix = write_string (module->c_prefix, strings, data, &header_size);
+ header->c_prefix = _g_ir_write_string (module->c_prefix, strings, data, &header_size);
else
header->c_prefix = 0;
header->directory = ALIGN_VALUE (header_size, 4);
@@ -398,18 +398,18 @@ g_ir_module_build_typelib (GIrModule *module)
entry->blob_type = 0;
entry->local = FALSE;
- entry->offset = write_string (namespace, strings, data, &offset2);
- entry->name = write_string (node->name, strings, data, &offset2);
+ entry->offset = _g_ir_write_string (namespace, strings, data, &offset2);
+ entry->name = _g_ir_write_string (node->name, strings, data, &offset2);
}
else
{
old_offset = offset;
- offset2 = offset + g_ir_node_get_size (node);
+ offset2 = offset + _g_ir_node_get_size (node);
entry->blob_type = node->type;
entry->local = TRUE;
entry->offset = offset;
- entry->name = write_string (node->name, strings, data, &offset2);
+ entry->name = _g_ir_write_string (node->name, strings, data, &offset2);
memset (&build, 0, sizeof (build));
build.module = module;
@@ -418,13 +418,13 @@ g_ir_module_build_typelib (GIrModule *module)
build.nodes_with_attributes = nodes_with_attributes;
build.n_attributes = header->n_attributes;
build.data = data;
- g_ir_node_build_typelib (node, NULL, &build, &offset, &offset2);
+ _g_ir_node_build_typelib (node, NULL, &build, &offset, &offset2);
nodes_with_attributes = build.nodes_with_attributes;
header->n_attributes = build.n_attributes;
- if (offset2 > old_offset + g_ir_node_get_full_size (node))
- g_error ("left a hole of %d bytes\n", offset2 - old_offset - g_ir_node_get_full_size (node));
+ if (offset2 > old_offset + _g_ir_node_get_full_size (node))
+ g_error ("left a hole of %d bytes\n", offset2 - old_offset - _g_ir_node_get_full_size (node));
}
entry++;
diff --git a/girepository/girmodule.h b/girepository/girmodule.h
index 6c6d620..c81dec3 100644
--- a/girepository/girmodule.h
+++ b/girepository/girmodule.h
@@ -59,18 +59,18 @@ struct _GIrModule
GHashTable *disguised_structures;
};
-GIrModule *g_ir_module_new (const gchar *name,
- const gchar *nsversion,
- const gchar *module_filename,
- const gchar *c_prefix);
-void g_ir_module_free (GIrModule *module);
+GIrModule *_g_ir_module_new (const gchar *name,
+ const gchar *nsversion,
+ const gchar *module_filename,
+ const gchar *c_prefix);
+void _g_ir_module_free (GIrModule *module);
-void g_ir_module_add_include_module (GIrModule *module,
+void _g_ir_module_add_include_module (GIrModule *module,
GIrModule *include_module);
-GITypelib * g_ir_module_build_typelib (GIrModule *module);
+GITypelib * _g_ir_module_build_typelib (GIrModule *module);
-void g_ir_module_fatal (GIrTypelibBuild *build, guint line, const char *msg, ...) G_GNUC_PRINTF (3, 4) G_GNUC_NORETURN;
+void _g_ir_module_fatal (GIrTypelibBuild *build, guint line, const char *msg, ...) G_GNUC_PRINTF (3, 4) G_GNUC_NORETURN;
void _g_irnode_init_stats (void);
void _g_irnode_dump_stats (void);
diff --git a/girepository/girnode.c b/girepository/girnode.c
index b298c95..fe45503 100644
--- a/girepository/girnode.c
+++ b/girepository/girnode.c
@@ -65,7 +65,7 @@ do { \
const gchar *
-g_ir_node_type_to_string (GIrNodeTypeId type)
+_g_ir_node_type_to_string (GIrNodeTypeId type)
{
switch (type)
{
@@ -113,7 +113,7 @@ g_ir_node_type_to_string (GIrNodeTypeId type)
}
GIrNode *
-g_ir_node_new (GIrNodeTypeId type,
+_g_ir_node_new (GIrNodeTypeId type,
GIrModule *module)
{
GIrNode *node = NULL;
@@ -202,7 +202,7 @@ g_ir_node_new (GIrNodeTypeId type,
}
void
-g_ir_node_free (GIrNode *node)
+_g_ir_node_free (GIrNode *node)
{
GList *l;
@@ -218,9 +218,9 @@ g_ir_node_free (GIrNode *node)
g_free (node->name);
g_free (function->symbol);
- g_ir_node_free ((GIrNode *)function->result);
+ _g_ir_node_free ((GIrNode *)function->result);
for (l = function->parameters; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (function->parameters);
}
break;
@@ -230,8 +230,8 @@ g_ir_node_free (GIrNode *node)
GIrNodeType *type = (GIrNodeType *)node;
g_free (node->name);
- g_ir_node_free ((GIrNode *)type->parameter_type1);
- g_ir_node_free ((GIrNode *)type->parameter_type2);
+ _g_ir_node_free ((GIrNode *)type->parameter_type1);
+ _g_ir_node_free ((GIrNode *)type->parameter_type2);
g_free (type->interface);
g_strfreev (type->errors);
@@ -244,7 +244,7 @@ g_ir_node_free (GIrNode *node)
GIrNodeParam *param = (GIrNodeParam *)node;
g_free (node->name);
- g_ir_node_free ((GIrNode *)param->type);
+ _g_ir_node_free ((GIrNode *)param->type);
}
break;
@@ -253,7 +253,7 @@ g_ir_node_free (GIrNode *node)
GIrNodeProperty *property = (GIrNodeProperty *)node;
g_free (node->name);
- g_ir_node_free ((GIrNode *)property->type);
+ _g_ir_node_free ((GIrNode *)property->type);
}
break;
@@ -263,9 +263,9 @@ g_ir_node_free (GIrNode *node)
g_free (node->name);
for (l = signal->parameters; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (signal->parameters);
- g_ir_node_free ((GIrNode *)signal->result);
+ _g_ir_node_free ((GIrNode *)signal->result);
}
break;
@@ -276,9 +276,9 @@ g_ir_node_free (GIrNode *node)
g_free (node->name);
g_free (vfunc->invoker);
for (l = vfunc->parameters; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (vfunc->parameters);
- g_ir_node_free ((GIrNode *)vfunc->result);
+ _g_ir_node_free ((GIrNode *)vfunc->result);
}
break;
@@ -287,8 +287,8 @@ g_ir_node_free (GIrNode *node)
GIrNodeField *field = (GIrNodeField *)node;
g_free (node->name);
- g_ir_node_free ((GIrNode *)field->type);
- g_ir_node_free ((GIrNode *)field->callback);
+ _g_ir_node_free ((GIrNode *)field->type);
+ _g_ir_node_free ((GIrNode *)field->callback);
}
break;
@@ -314,7 +314,7 @@ g_ir_node_free (GIrNode *node)
g_list_free (iface->interfaces);
for (l = iface->members; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (iface->members);
}
@@ -336,7 +336,7 @@ g_ir_node_free (GIrNode *node)
g_free (enum_->gtype_init);
for (l = enum_->values; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (enum_->values);
}
break;
@@ -350,7 +350,7 @@ g_ir_node_free (GIrNode *node)
g_free (boxed->gtype_init);
for (l = boxed->members; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (boxed->members);
}
break;
@@ -364,7 +364,7 @@ g_ir_node_free (GIrNode *node)
g_free (struct_->gtype_init);
for (l = struct_->members; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
g_list_free (struct_->members);
}
break;
@@ -375,7 +375,7 @@ g_ir_node_free (GIrNode *node)
g_free (node->name);
g_free (constant->value);
- g_ir_node_free ((GIrNode *)constant->type);
+ _g_ir_node_free ((GIrNode *)constant->type);
}
break;
@@ -406,11 +406,11 @@ g_ir_node_free (GIrNode *node)
g_free (union_->gtype_name);
g_free (union_->gtype_init);
- g_ir_node_free ((GIrNode *)union_->discriminator_type);
+ _g_ir_node_free ((GIrNode *)union_->discriminator_type);
for (l = union_->members; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
for (l = union_->discriminators; l; l = l->next)
- g_ir_node_free ((GIrNode *)l->data);
+ _g_ir_node_free ((GIrNode *)l->data);
}
break;
@@ -426,7 +426,7 @@ g_ir_node_free (GIrNode *node)
/* returns the fixed size of the blob */
guint32
-g_ir_node_get_size (GIrNode *node)
+_g_ir_node_get_size (GIrNode *node)
{
GList *l;
gint size, n;
@@ -458,7 +458,7 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (ObjectBlob) + 2 * (n + (n % 2));
for (l = iface->members; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
}
break;
@@ -470,7 +470,7 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (InterfaceBlob) + 2 * (n + (n % 2));
for (l = iface->members; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
}
break;
@@ -481,7 +481,7 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (EnumBlob);
for (l = enum_->values; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
}
break;
@@ -495,7 +495,7 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (StructBlob);
for (l = struct_->members; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
}
break;
@@ -505,7 +505,7 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (StructBlob);
for (l = boxed->members; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
}
break;
@@ -527,7 +527,7 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (FieldBlob);
if (field->callback)
- size += g_ir_node_get_size ((GIrNode *)field->callback);
+ size += _g_ir_node_get_size ((GIrNode *)field->callback);
}
break;
@@ -549,20 +549,20 @@ g_ir_node_get_size (GIrNode *node)
size = sizeof (UnionBlob);
for (l = union_->members; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
for (l = union_->discriminators; l; l = l->next)
- size += g_ir_node_get_size ((GIrNode *)l->data);
+ size += _g_ir_node_get_size ((GIrNode *)l->data);
}
break;
default:
g_error ("Unhandled node type '%s'\n",
- g_ir_node_type_to_string (node->type));
+ _g_ir_node_type_to_string (node->type));
size = 0;
}
g_debug ("node %p type '%s' size %d", node,
- g_ir_node_type_to_string (node->type), size);
+ _g_ir_node_type_to_string (node->type), size);
return size;
}
@@ -581,7 +581,7 @@ add_attribute_size (gpointer key, gpointer value, gpointer data)
/* returns the full size of the blob including variable-size parts (including attributes) */
static guint32
-g_ir_node_get_full_size_internal (GIrNode *parent,
+_g_ir_node_get_full_size_internal (GIrNode *parent,
GIrNode *node)
{
GList *l;
@@ -591,7 +591,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
g_error ("Caught NULL node, parent=%s", parent->name);
g_debug ("node %p type '%s'", node,
- g_ir_node_type_to_string (node->type));
+ _g_ir_node_type_to_string (node->type));
switch (node->type)
{
@@ -602,9 +602,9 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
for (l = function->parameters; l; l = l->next)
{
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)function->result);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)function->result);
}
break;
@@ -615,8 +615,8 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
size += ALIGN_VALUE (strlen (function->symbol) + 1, 4);
for (l = function->parameters; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)function->result);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)function->result);
}
break;
@@ -628,7 +628,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size = sizeof (ArgBlob) - sizeof (SimpleTypeBlob);
if (node->name)
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)param->type);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)param->type);
}
break;
@@ -646,7 +646,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
case GI_TYPE_TAG_ARRAY:
size = sizeof (ArrayTypeBlob);
if (type->parameter_type1)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
break;
case GI_TYPE_TAG_INTERFACE:
size += sizeof (InterfaceTypeBlob);
@@ -655,14 +655,14 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
case GI_TYPE_TAG_GSLIST:
size += sizeof (ParamTypeBlob);
if (type->parameter_type1)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
break;
case GI_TYPE_TAG_GHASH:
size += sizeof (ParamTypeBlob) * 2;
if (type->parameter_type1)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type1);
if (type->parameter_type2)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type2);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)type->parameter_type2);
break;
case GI_TYPE_TAG_ERROR:
{
@@ -709,7 +709,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size += 2 * (n + (n % 2));
for (l = iface->members; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
break;
@@ -725,7 +725,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size += 2 * (n + (n % 2));
for (l = iface->members; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
break;
@@ -743,7 +743,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
}
for (l = enum_->values; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
break;
@@ -765,7 +765,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
if (struct_->gtype_init)
size += ALIGN_VALUE (strlen (struct_->gtype_init) + 1, 4);
for (l = struct_->members; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
break;
@@ -781,7 +781,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size += ALIGN_VALUE (strlen (boxed->gtype_init) + 1, 4);
}
for (l = boxed->members; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
break;
@@ -791,7 +791,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size = sizeof (PropertyBlob);
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)prop->type);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)prop->type);
}
break;
@@ -802,8 +802,8 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size = sizeof (SignalBlob);
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
for (l = signal->parameters; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)signal->result);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)signal->result);
}
break;
@@ -814,8 +814,8 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size = sizeof (VFuncBlob);
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
for (l = vfunc->parameters; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)vfunc->result);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)vfunc->result);
}
break;
@@ -826,9 +826,9 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size = sizeof (FieldBlob);
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
if (field->callback)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)field->callback);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)field->callback);
else
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)field->type);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)field->type);
}
break;
@@ -840,7 +840,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
size += ALIGN_VALUE (strlen (node->name) + 1, 4);
/* FIXME non-string values */
size += ALIGN_VALUE (strlen (constant->value) + 1, 4);
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)constant->type);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)constant->type);
}
break;
@@ -875,9 +875,9 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
if (union_->gtype_init)
size += ALIGN_VALUE (strlen (union_->gtype_init) + 1, 4);
for (l = union_->members; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
for (l = union_->discriminators; l; l = l->next)
- size += g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
+ size += _g_ir_node_get_full_size_internal (node, (GIrNode *)l->data);
}
break;
@@ -890,7 +890,7 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
node->name ? "'" : "",
node->name ? node->name : "",
node->name ? "' " : "",
- node, g_ir_node_type_to_string (node->type), size);
+ node, _g_ir_node_type_to_string (node->type), size);
g_hash_table_foreach (node->attributes, add_attribute_size, &size);
@@ -898,13 +898,13 @@ g_ir_node_get_full_size_internal (GIrNode *parent,
}
guint32
-g_ir_node_get_full_size (GIrNode *node)
+_g_ir_node_get_full_size (GIrNode *node)
{
- return g_ir_node_get_full_size_internal (NULL, node);
+ return _g_ir_node_get_full_size_internal (NULL, node);
}
int
-g_ir_node_cmp (GIrNode *node,
+_g_ir_node_cmp (GIrNode *node,
GIrNode *other)
{
if (node->type < other->type)
@@ -916,7 +916,7 @@ g_ir_node_cmp (GIrNode *node,
}
gboolean
-g_ir_node_can_have_member (GIrNode *node)
+_g_ir_node_can_have_member (GIrNode *node)
{
switch (node->type)
{
@@ -950,7 +950,7 @@ g_ir_node_can_have_member (GIrNode *node)
}
void
-g_ir_node_add_member (GIrNode *node,
+_g_ir_node_add_member (GIrNode *node,
GIrNodeFunction *member)
{
g_return_if_fail (node != NULL);
@@ -964,7 +964,7 @@ g_ir_node_add_member (GIrNode *node,
GIrNodeInterface *iface = (GIrNodeInterface *)node;
iface->members =
g_list_insert_sorted (iface->members, member,
- (GCompareFunc) g_ir_node_cmp);
+ (GCompareFunc) _g_ir_node_cmp);
break;
}
case G_IR_NODE_BOXED:
@@ -972,7 +972,7 @@ g_ir_node_add_member (GIrNode *node,
GIrNodeBoxed *boxed = (GIrNodeBoxed *)node;
boxed->members =
g_list_insert_sorted (boxed->members, member,
- (GCompareFunc) g_ir_node_cmp);
+ (GCompareFunc) _g_ir_node_cmp);
break;
}
case G_IR_NODE_STRUCT:
@@ -980,7 +980,7 @@ g_ir_node_add_member (GIrNode *node,
GIrNodeStruct *struct_ = (GIrNodeStruct *)node;
struct_->members =
g_list_insert_sorted (struct_->members, member,
- (GCompareFunc) g_ir_node_cmp);
+ (GCompareFunc) _g_ir_node_cmp);
break;
}
case G_IR_NODE_UNION:
@@ -988,7 +988,7 @@ g_ir_node_add_member (GIrNode *node,
GIrNodeUnion *union_ = (GIrNodeUnion *)node;
union_->members =
g_list_insert_sorted (union_->members, member,
- (GCompareFunc) g_ir_node_cmp);
+ (GCompareFunc) _g_ir_node_cmp);
break;
}
default:
@@ -999,7 +999,7 @@ g_ir_node_add_member (GIrNode *node,
}
const gchar *
-g_ir_node_param_direction_string (GIrNodeParam * node)
+_g_ir_node_param_direction_string (GIrNodeParam * node)
{
if (node->out)
{
@@ -1088,7 +1088,7 @@ find_entry_node (GIrTypelibBuild *build,
if (n_names > 1)
{
- GIrNode *node = g_ir_node_new (G_IR_NODE_XREF, module);
+ GIrNode *node = _g_ir_node_new (G_IR_NODE_XREF, module);
((GIrNodeXRef *)node)->namespace = g_strdup (names[0]);
node->name = g_strdup (names[1]);
@@ -1106,8 +1106,8 @@ find_entry_node (GIrTypelibBuild *build,
}
- g_ir_module_fatal (build, -1, "type reference '%s' not found",
- name);
+ _g_ir_module_fatal (build, -1, "type reference '%s' not found",
+ name);
out:
g_strfreev (names);
@@ -1151,7 +1151,7 @@ find_namespace (GIrModule *module,
}
GIrNode *
-g_ir_find_node (GIrTypelibBuild *build,
+_g_ir_find_node (GIrTypelibBuild *build,
GIrModule *src_module,
const char *name)
{
@@ -1312,7 +1312,7 @@ serialize_type (GIrTypelibBuild *build,
}
static void
-g_ir_node_build_members (GList **members,
+_g_ir_node_build_members (GList **members,
GIrNodeTypeId type,
guint16 *count,
GIrNode *parent,
@@ -1330,7 +1330,7 @@ g_ir_node_build_members (GList **members,
if (member->type == type)
{
(*count)++;
- g_ir_node_build_typelib (member, parent, build, offset, offset2);
+ _g_ir_node_build_typelib (member, parent, build, offset, offset2);
*members = g_list_delete_link (*members, l);
}
l = next;
@@ -1338,8 +1338,8 @@ g_ir_node_build_members (GList **members,
}
static void
-g_ir_node_check_unhandled_members (GList **members,
- GIrNodeTypeId container_type)
+_g_ir_node_check_unhandled_members (GList **members,
+ GIrNodeTypeId container_type)
{
#if 0
if (*members)
@@ -1350,9 +1350,9 @@ g_ir_node_check_unhandled_members (GList **members,
{
GIrNode *member = (GIrNode *)l->data;
g_printerr ("Unhandled '%s' member '%s' type '%s'\n",
- g_ir_node_type_to_string (container_type),
+ _g_ir_node_type_to_string (container_type),
member->name,
- g_ir_node_type_to_string (member->type));
+ _g_ir_node_type_to_string (member->type));
}
g_list_free (*members);
@@ -1367,11 +1367,11 @@ g_ir_node_check_unhandled_members (GList **members,
}
void
-g_ir_node_build_typelib (GIrNode *node,
- GIrNode *parent,
- GIrTypelibBuild *build,
- guint32 *offset,
- guint32 *offset2)
+_g_ir_node_build_typelib (GIrNode *node,
+ GIrNode *parent,
+ GIrTypelibBuild *build,
+ guint32 *offset,
+ guint32 *offset2)
{
gboolean appended_stack;
GHashTable *strings = build->strings;
@@ -1386,7 +1386,7 @@ g_ir_node_build_typelib (GIrNode *node,
g_debug ("build_typelib: %s%s(%s)",
node->name ? node->name : "",
node->name ? " " : "",
- g_ir_node_type_to_string (node->type));
+ _g_ir_node_type_to_string (node->type));
if (build->stack)
appended_stack = node != (GIrNode*)build->stack->data;
@@ -1395,7 +1395,7 @@ g_ir_node_build_typelib (GIrNode *node,
if (appended_stack)
build->stack = g_list_prepend (build->stack, node);
- g_ir_node_compute_offsets (build, node);
+ _g_ir_node_compute_offsets (build, node);
/* We should only be building each node once. If we do a typelib expansion, we also
* reset the offset in girmodule.c.
@@ -1471,7 +1471,7 @@ g_ir_node_build_typelib (GIrNode *node,
pos = *offset2 + G_STRUCT_OFFSET (ArrayTypeBlob, type);
*offset2 += sizeof (ArrayTypeBlob);
- g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
+ _g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
node, build, &pos, offset2);
}
break;
@@ -1505,7 +1505,7 @@ g_ir_node_build_typelib (GIrNode *node,
pos = *offset2 + G_STRUCT_OFFSET (ParamTypeBlob, type);
*offset2 += sizeof (ParamTypeBlob) + sizeof (SimpleTypeBlob);
- g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
+ _g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
node, build, &pos, offset2);
}
break;
@@ -1524,9 +1524,9 @@ g_ir_node_build_typelib (GIrNode *node,
pos = *offset2 + G_STRUCT_OFFSET (ParamTypeBlob, type);
*offset2 += sizeof (ParamTypeBlob) + sizeof (SimpleTypeBlob)*2;
- g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
+ _g_ir_node_build_typelib ((GIrNode *)type->parameter_type1,
node, build, &pos, offset2);
- g_ir_node_build_typelib ((GIrNode *)type->parameter_type2,
+ _g_ir_node_build_typelib ((GIrNode *)type->parameter_type2,
node, build, &pos, offset2);
}
break;
@@ -1568,7 +1568,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob = (FieldBlob *)&data[*offset];
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->readable = field->readable;
blob->writable = field->writable;
blob->reserved = 0;
@@ -1583,7 +1583,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->has_embedded_type = TRUE;
blob->type.offset = GI_INFO_TYPE_CALLBACK;
*offset += sizeof (FieldBlob);
- g_ir_node_build_typelib ((GIrNode *)field->callback,
+ _g_ir_node_build_typelib ((GIrNode *)field->callback,
node, build, offset, offset2);
}
else
@@ -1591,7 +1591,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->has_embedded_type = FALSE;
/* We handle the size member specially below, so subtract it */
*offset += sizeof (FieldBlob) - sizeof (SimpleTypeBlob);
- g_ir_node_build_typelib ((GIrNode *)field->type,
+ _g_ir_node_build_typelib ((GIrNode *)field->type,
node, build, offset, offset2);
}
}
@@ -1604,7 +1604,7 @@ g_ir_node_build_typelib (GIrNode *node,
/* We handle the size member specially below, so subtract it */
*offset += sizeof (PropertyBlob) - sizeof (SimpleTypeBlob);
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->deprecated = prop->deprecated;
blob->readable = prop->readable;
blob->writable = prop->writable;
@@ -1614,7 +1614,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->transfer_container_ownership = prop->shallow_transfer;
blob->reserved = 0;
- g_ir_node_build_typelib ((GIrNode *)prop->type,
+ _g_ir_node_build_typelib ((GIrNode *)prop->type,
node, build, offset, offset2);
}
break;
@@ -1642,8 +1642,8 @@ g_ir_node_build_typelib (GIrNode *node,
blob->wraps_vfunc = function->wraps_vfunc;
blob->throws = function->throws;
blob->index = 0;
- blob->name = write_string (node->name, strings, data, offset2);
- blob->symbol = write_string (function->symbol, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+ blob->symbol = _g_ir_write_string (function->symbol, strings, data, offset2);
blob->signature = signature;
/* function->result is special since it doesn't appear in the serialized format but
@@ -1656,7 +1656,7 @@ g_ir_node_build_typelib (GIrNode *node,
g_debug ("building function '%s'", function->symbol);
- g_ir_node_build_typelib ((GIrNode *)function->result->type,
+ _g_ir_node_build_typelib ((GIrNode *)function->result->type,
node, build, &signature, offset2);
blob2->may_return_null = function->result->allow_none;
@@ -1671,7 +1671,7 @@ g_ir_node_build_typelib (GIrNode *node,
{
GIrNode *param = (GIrNode *)l->data;
- g_ir_node_build_typelib (param, node, build, &signature, offset2);
+ _g_ir_node_build_typelib (param, node, build, &signature, offset2);
}
}
@@ -1694,10 +1694,10 @@ g_ir_node_build_typelib (GIrNode *node,
blob->blob_type = BLOB_TYPE_CALLBACK;
blob->deprecated = function->deprecated;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->signature = signature;
- g_ir_node_build_typelib ((GIrNode *)function->result->type,
+ _g_ir_node_build_typelib ((GIrNode *)function->result->type,
node, build, &signature, offset2);
blob2->may_return_null = function->result->allow_none;
@@ -1712,7 +1712,7 @@ g_ir_node_build_typelib (GIrNode *node,
{
GIrNode *param = (GIrNode *)l->data;
- g_ir_node_build_typelib (param, node, build, &signature, offset2);
+ _g_ir_node_build_typelib (param, node, build, &signature, offset2);
}
}
break;
@@ -1743,7 +1743,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->true_stops_emit = 0; /* FIXME */
blob->reserved = 0;
blob->class_closure = 0; /* FIXME */
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->signature = signature;
/* signal->result is special since it doesn't appear in the serialized format but
@@ -1754,7 +1754,7 @@ g_ir_node_build_typelib (GIrNode *node,
g_assert (((GIrNode *) signal->result)->offset == 0);
((GIrNode *) signal->result)->offset = signature;
- g_ir_node_build_typelib ((GIrNode *)signal->result->type,
+ _g_ir_node_build_typelib ((GIrNode *)signal->result->type,
node, build, &signature, offset2);
blob2->may_return_null = signal->result->allow_none;
@@ -1769,7 +1769,7 @@ g_ir_node_build_typelib (GIrNode *node,
{
GIrNode *param = (GIrNode *)l->data;
- g_ir_node_build_typelib (param, node, build, &signature, offset2);
+ _g_ir_node_build_typelib (param, node, build, &signature, offset2);
}
}
break;
@@ -1788,7 +1788,7 @@ g_ir_node_build_typelib (GIrNode *node,
*offset += sizeof (VFuncBlob);
*offset2 += sizeof (SignatureBlob) + n * sizeof (ArgBlob);
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->must_chain_up = 0; /* FIXME */
blob->must_be_implemented = 0; /* FIXME */
blob->must_not_be_implemented = 0; /* FIXME */
@@ -1811,7 +1811,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->reserved2 = 0;
blob->signature = signature;
- g_ir_node_build_typelib ((GIrNode *)vfunc->result->type,
+ _g_ir_node_build_typelib ((GIrNode *)vfunc->result->type,
node, build, &signature, offset2);
blob2->may_return_null = vfunc->result->allow_none;
@@ -1826,7 +1826,7 @@ g_ir_node_build_typelib (GIrNode *node,
{
GIrNode *param = (GIrNode *)l->data;
- g_ir_node_build_typelib (param, node, build, &signature, offset2);
+ _g_ir_node_build_typelib (param, node, build, &signature, offset2);
}
}
break;
@@ -1841,7 +1841,7 @@ g_ir_node_build_typelib (GIrNode *node,
*/
*offset += sizeof (ArgBlob) - sizeof (SimpleTypeBlob);
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->in = param->in;
blob->out = param->out;
blob->caller_allocates = param->caller_allocates;
@@ -1855,7 +1855,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->closure = param->closure;
blob->destroy = param->destroy;
- g_ir_node_build_typelib ((GIrNode *)param->type, node, build, offset, offset2);
+ _g_ir_node_build_typelib ((GIrNode *)param->type, node, build, offset, offset2);
}
break;
@@ -1870,15 +1870,15 @@ g_ir_node_build_typelib (GIrNode *node,
blob->deprecated = struct_->deprecated;
blob->is_gtype_struct = struct_->is_gtype_struct;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->alignment = struct_->alignment;
blob->size = struct_->size;
if (struct_->gtype_name)
{
blob->unregistered = FALSE;
- blob->gtype_name = write_string (struct_->gtype_name, strings, data, offset2);
- blob->gtype_init = write_string (struct_->gtype_init, strings, data, offset2);
+ blob->gtype_name = _g_ir_write_string (struct_->gtype_name, strings, data, offset2);
+ blob->gtype_init = _g_ir_write_string (struct_->gtype_init, strings, data, offset2);
}
else
{
@@ -1894,13 +1894,13 @@ g_ir_node_build_typelib (GIrNode *node,
members = g_list_copy (struct_->members);
- g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+ _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
node, build, offset, offset2);
- g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+ _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
node, build, offset, offset2);
- g_ir_node_check_unhandled_members (&members, node->type);
+ _g_ir_node_check_unhandled_members (&members, node->type);
g_assert (members == NULL);
}
@@ -1916,9 +1916,9 @@ g_ir_node_build_typelib (GIrNode *node,
blob->deprecated = boxed->deprecated;
blob->unregistered = FALSE;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
- blob->gtype_name = write_string (boxed->gtype_name, strings, data, offset2);
- blob->gtype_init = write_string (boxed->gtype_init, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+ blob->gtype_name = _g_ir_write_string (boxed->gtype_name, strings, data, offset2);
+ blob->gtype_init = _g_ir_write_string (boxed->gtype_init, strings, data, offset2);
blob->alignment = boxed->alignment;
blob->size = boxed->size;
@@ -1929,13 +1929,13 @@ g_ir_node_build_typelib (GIrNode *node,
members = g_list_copy (boxed->members);
- g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
- node, build, offset, offset2);
+ _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+ node, build, offset, offset2);
- g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
- node, build, offset, offset2);
+ _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+ node, build, offset, offset2);
- g_ir_node_check_unhandled_members (&members, node->type);
+ _g_ir_node_check_unhandled_members (&members, node->type);
g_assert (members == NULL);
}
@@ -1950,14 +1950,14 @@ g_ir_node_build_typelib (GIrNode *node,
blob->blob_type = BLOB_TYPE_UNION;
blob->deprecated = union_->deprecated;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->alignment = union_->alignment;
blob->size = union_->size;
if (union_->gtype_name)
{
blob->unregistered = FALSE;
- blob->gtype_name = write_string (union_->gtype_name, strings, data, offset2);
- blob->gtype_init = write_string (union_->gtype_init, strings, data, offset2);
+ blob->gtype_name = _g_ir_write_string (union_->gtype_name, strings, data, offset2);
+ blob->gtype_init = _g_ir_write_string (union_->gtype_init, strings, data, offset2);
}
else
{
@@ -1977,7 +1977,7 @@ g_ir_node_build_typelib (GIrNode *node,
{
*offset += 28;
blob->discriminated = TRUE;
- g_ir_node_build_typelib ((GIrNode *)union_->discriminator_type,
+ _g_ir_node_build_typelib ((GIrNode *)union_->discriminator_type,
build, offset, offset2);
}
else
@@ -1989,13 +1989,13 @@ g_ir_node_build_typelib (GIrNode *node,
members = g_list_copy (union_->members);
- g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+ _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
node, build, offset, offset2);
- g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_functions,
+ _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_functions,
node, build, offset, offset2);
- g_ir_node_check_unhandled_members (&members, node->type);
+ _g_ir_node_check_unhandled_members (&members, node->type);
g_assert (members == NULL);
@@ -2005,7 +2005,7 @@ g_ir_node_build_typelib (GIrNode *node,
{
GIrNode *member = (GIrNode *)l->data;
- g_ir_node_build_typelib (member, node, build, offset, offset2);
+ _g_ir_node_build_typelib (member, node, build, offset, offset2);
}
}
}
@@ -2027,12 +2027,12 @@ g_ir_node_build_typelib (GIrNode *node,
blob->deprecated = enum_->deprecated;
blob->reserved = 0;
blob->storage_type = enum_->storage_type;
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
if (enum_->gtype_name)
{
blob->unregistered = FALSE;
- blob->gtype_name = write_string (enum_->gtype_name, strings, data, offset2);
- blob->gtype_init = write_string (enum_->gtype_init, strings, data, offset2);
+ blob->gtype_name = _g_ir_write_string (enum_->gtype_name, strings, data, offset2);
+ blob->gtype_init = _g_ir_write_string (enum_->gtype_init, strings, data, offset2);
}
else
{
@@ -2049,7 +2049,7 @@ g_ir_node_build_typelib (GIrNode *node,
GIrNode *value = (GIrNode *)l->data;
blob->n_values++;
- g_ir_node_build_typelib (value, node, build, offset, offset2);
+ _g_ir_node_build_typelib (value, node, build, offset, offset2);
}
}
break;
@@ -2065,17 +2065,17 @@ g_ir_node_build_typelib (GIrNode *node,
blob->fundamental = object->fundamental;
blob->deprecated = object->deprecated;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
- blob->gtype_name = write_string (object->gtype_name, strings, data, offset2);
- blob->gtype_init = write_string (object->gtype_init, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+ blob->gtype_name = _g_ir_write_string (object->gtype_name, strings, data, offset2);
+ blob->gtype_init = _g_ir_write_string (object->gtype_init, strings, data, offset2);
if (object->ref_func)
- blob->ref_func = write_string (object->ref_func, strings, data, offset2);
+ blob->ref_func = _g_ir_write_string (object->ref_func, strings, data, offset2);
if (object->unref_func)
- blob->unref_func = write_string (object->unref_func, strings, data, offset2);
+ blob->unref_func = _g_ir_write_string (object->unref_func, strings, data, offset2);
if (object->set_value_func)
- blob->set_value_func = write_string (object->set_value_func, strings, data, offset2);
+ blob->set_value_func = _g_ir_write_string (object->set_value_func, strings, data, offset2);
if (object->get_value_func)
- blob->get_value_func = write_string (object->get_value_func, strings, data, offset2);
+ blob->get_value_func = _g_ir_write_string (object->get_value_func, strings, data, offset2);
if (object->parent)
blob->parent = find_entry (build, object->parent);
else
@@ -2104,30 +2104,30 @@ g_ir_node_build_typelib (GIrNode *node,
members = g_list_copy (object->members);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
+ _g_ir_node_build_members (&members, G_IR_NODE_FIELD, &blob->n_fields,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_PROPERTY, &blob->n_properties,
+ _g_ir_node_build_members (&members, G_IR_NODE_PROPERTY, &blob->n_properties,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+ _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_SIGNAL, &blob->n_signals,
+ _g_ir_node_build_members (&members, G_IR_NODE_SIGNAL, &blob->n_signals,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_VFUNC, &blob->n_vfuncs,
+ _g_ir_node_build_members (&members, G_IR_NODE_VFUNC, &blob->n_vfuncs,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_CONSTANT, &blob->n_constants,
+ _g_ir_node_build_members (&members, G_IR_NODE_CONSTANT, &blob->n_constants,
node, build, offset, offset2);
- g_ir_node_check_unhandled_members (&members, node->type);
+ _g_ir_node_check_unhandled_members (&members, node->type);
g_assert (members == NULL);
}
@@ -2142,9 +2142,9 @@ g_ir_node_build_typelib (GIrNode *node,
blob->blob_type = BLOB_TYPE_INTERFACE;
blob->deprecated = iface->deprecated;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
- blob->gtype_name = write_string (iface->gtype_name, strings, data, offset2);
- blob->gtype_init = write_string (iface->gtype_init, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+ blob->gtype_name = _g_ir_write_string (iface->gtype_name, strings, data, offset2);
+ blob->gtype_init = _g_ir_write_string (iface->gtype_init, strings, data, offset2);
if (iface->glib_type_struct)
blob->gtype_struct = find_entry (build, iface->glib_type_struct);
else
@@ -2167,26 +2167,26 @@ g_ir_node_build_typelib (GIrNode *node,
members = g_list_copy (iface->members);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_PROPERTY, &blob->n_properties,
+ _g_ir_node_build_members (&members, G_IR_NODE_PROPERTY, &blob->n_properties,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
+ _g_ir_node_build_members (&members, G_IR_NODE_FUNCTION, &blob->n_methods,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_SIGNAL, &blob->n_signals,
+ _g_ir_node_build_members (&members, G_IR_NODE_SIGNAL, &blob->n_signals,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_VFUNC, &blob->n_vfuncs,
+ _g_ir_node_build_members (&members, G_IR_NODE_VFUNC, &blob->n_vfuncs,
node, build, offset, offset2);
*offset = ALIGN_VALUE (*offset, 4);
- g_ir_node_build_members (&members, G_IR_NODE_CONSTANT, &blob->n_constants,
+ _g_ir_node_build_members (&members, G_IR_NODE_CONSTANT, &blob->n_constants,
node, build, offset, offset2);
- g_ir_node_check_unhandled_members (&members, node->type);
+ _g_ir_node_check_unhandled_members (&members, node->type);
g_assert (members == NULL);
}
@@ -2202,7 +2202,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->deprecated = value->deprecated;
blob->reserved = 0;
blob->unsigned_value = value->value >= 0 ? 1 : 0;
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->value = (gint32)value->value;
}
break;
@@ -2216,8 +2216,8 @@ g_ir_node_build_typelib (GIrNode *node,
blob->blob_type = BLOB_TYPE_ERROR_DOMAIN;
blob->deprecated = domain->deprecated;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
- blob->get_quark = write_string (domain->getquark, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
+ blob->get_quark = _g_ir_write_string (domain->getquark, strings, data, offset2);
blob->error_codes = find_entry (build, domain->codes);
blob->reserved2 = 0;
}
@@ -2235,7 +2235,7 @@ g_ir_node_build_typelib (GIrNode *node,
blob->blob_type = BLOB_TYPE_CONSTANT;
blob->deprecated = constant->deprecated;
blob->reserved = 0;
- blob->name = write_string (node->name, strings, data, offset2);
+ blob->name = _g_ir_write_string (node->name, strings, data, offset2);
blob->offset = *offset2;
switch (constant->type->tag)
@@ -2292,7 +2292,7 @@ g_ir_node_build_typelib (GIrNode *node,
}
*offset2 += ALIGN_VALUE (blob->size, 4);
- g_ir_node_build_typelib ((GIrNode *)constant->type, node, build, &pos, offset2);
+ _g_ir_node_build_typelib ((GIrNode *)constant->type, node, build, &pos, offset2);
}
break;
default:
@@ -2303,12 +2303,12 @@ g_ir_node_build_typelib (GIrNode *node,
node->name ? "'" : "",
node->name ? node->name : "",
node->name ? "' " : "",
- node, g_ir_node_type_to_string (node->type),
+ node, _g_ir_node_type_to_string (node->type),
old_offset, *offset, old_offset2, *offset2);
- if (*offset2 - old_offset2 + *offset - old_offset > g_ir_node_get_full_size (node))
+ if (*offset2 - old_offset2 + *offset - old_offset > _g_ir_node_get_full_size (node))
g_error ("exceeding space reservation; offset: %d (prev %d) offset2: %d (prev %d) nodesize: %d",
- *offset, old_offset, *offset2, old_offset2, g_ir_node_get_full_size (node));
+ *offset, old_offset, *offset2, old_offset2, _g_ir_node_get_full_size (node));
if (appended_stack)
build->stack = g_list_delete_link (build->stack, build->stack);
@@ -2319,10 +2319,10 @@ g_ir_node_build_typelib (GIrNode *node,
* typelib is not large enough to hold the string, reallocate it.
*/
guint32
-write_string (const gchar *str,
- GHashTable *strings,
- guchar *data,
- guint32 *offset)
+_g_ir_write_string (const gchar *str,
+ GHashTable *strings,
+ guchar *data,
+ guint32 *offset)
{
gpointer value;
guint32 start;
diff --git a/girepository/girnode.h b/girepository/girnode.h
index 0df1008..e215e2c 100644
--- a/girepository/girnode.h
+++ b/girepository/girnode.h
@@ -354,36 +354,36 @@ struct _GIrNodeErrorDomain
};
-GIrNode * g_ir_node_new (GIrNodeTypeId type,
+GIrNode * _g_ir_node_new (GIrNodeTypeId type,
GIrModule *module);
-void g_ir_node_free (GIrNode *node);
-guint32 g_ir_node_get_size (GIrNode *node);
-guint32 g_ir_node_get_full_size (GIrNode *node);
-void g_ir_node_build_typelib (GIrNode *node,
- GIrNode *parent,
- GIrTypelibBuild *build,
- guint32 *offset,
- guint32 *offset2);
-int g_ir_node_cmp (GIrNode *node,
+void _g_ir_node_free (GIrNode *node);
+guint32 _g_ir_node_get_size (GIrNode *node);
+guint32 _g_ir_node_get_full_size (GIrNode *node);
+void _g_ir_node_build_typelib (GIrNode *node,
+ GIrNode *parent,
+ GIrTypelibBuild *build,
+ guint32 *offset,
+ guint32 *offset2);
+int _g_ir_node_cmp (GIrNode *node,
GIrNode *other);
-gboolean g_ir_node_can_have_member (GIrNode *node);
-void g_ir_node_add_member (GIrNode *node,
- GIrNodeFunction *member);
-guint32 write_string (const gchar *str,
- GHashTable *strings,
- guchar *data,
- guint32 *offset);
-
-const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
-const gchar * g_ir_node_type_to_string (GIrNodeTypeId type);
-
-GIrNode *g_ir_find_node (GIrTypelibBuild *build,
+gboolean _g_ir_node_can_have_member (GIrNode *node);
+void _g_ir_node_add_member (GIrNode *node,
+ GIrNodeFunction *member);
+guint32 _g_ir_write_string (const gchar *str,
+ GHashTable *strings,
+ guchar *data,
+ guint32 *offset);
+
+const gchar * _g_ir_node_param_direction_string (GIrNodeParam * node);
+const gchar * _g_ir_node_type_to_string (GIrNodeTypeId type);
+
+GIrNode *_g_ir_find_node (GIrTypelibBuild *build,
GIrModule *module,
const char *name);
/* In giroffsets.c */
-void g_ir_node_compute_offsets (GIrTypelibBuild *build,
+void _g_ir_node_compute_offsets (GIrTypelibBuild *build,
GIrNode *node);
diff --git a/girepository/giroffsets.c b/girepository/giroffsets.c
index 5c16f81..7b30809 100644
--- a/girepository/giroffsets.c
+++ b/girepository/giroffsets.c
@@ -189,16 +189,16 @@ get_interface_size_alignment (GIrTypelibBuild *build,
{
GIrNode *iface;
- iface = g_ir_find_node (build, ((GIrNode*)type)->module, type->interface);
+ iface = _g_ir_find_node (build, ((GIrNode*)type)->module, type->interface);
if (!iface)
{
- g_ir_module_fatal (build, 0, "Can't resolve type '%s' for %s", type->interface, who);
+ _g_ir_module_fatal (build, 0, "Can't resolve type '%s' for %s", type->interface, who);
*size = -1;
*alignment = -1;
return FALSE;
}
- g_ir_node_compute_offsets (build, iface);
+ _g_ir_node_compute_offsets (build, iface);
switch (iface->type)
{
@@ -247,7 +247,7 @@ get_interface_size_alignment (GIrTypelibBuild *build,
{
g_warning ("%s has is not a pointer and is of type %s",
who,
- g_ir_node_type_to_string (iface->type));
+ _g_ir_node_type_to_string (iface->type));
*size = -1;
*alignment = -1;
break;
@@ -497,7 +497,7 @@ check_needs_computation (GIrTypelibBuild *build,
}
/**
- * g_ir_node_compute_offsets:
+ * _g_ir_node_compute_offsets:
* @build: Current typelib build
* @node: a #GIrNode
*
@@ -506,8 +506,8 @@ check_needs_computation (GIrTypelibBuild *build,
* alignment for the type.
*/
void
-g_ir_node_compute_offsets (GIrTypelibBuild *build,
- GIrNode *node)
+_g_ir_node_compute_offsets (GIrTypelibBuild *build,
+ GIrNode *node)
{
gboolean appended_stack;
diff --git a/girepository/girparser.c b/girepository/girparser.c
index 0e31e9f..0b05839 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -161,7 +161,7 @@ static const gchar *find_attribute (const gchar *name,
GIrParser *
-g_ir_parser_new (void)
+_g_ir_parser_new (void)
{
GIrParser *parser = g_slice_new0 (GIrParser);
@@ -169,7 +169,7 @@ g_ir_parser_new (void)
}
void
-g_ir_parser_free (GIrParser *parser)
+_g_ir_parser_free (GIrParser *parser)
{
GList *l;
@@ -177,14 +177,14 @@ g_ir_parser_free (GIrParser *parser)
g_strfreev (parser->includes);
for (l = parser->parsed_modules; l; l = l->next)
- g_ir_module_free (l->data);
+ _g_ir_module_free (l->data);
g_slice_free (GIrParser, parser);
}
void
-g_ir_parser_set_includes (GIrParser *parser,
- const gchar *const *includes)
+_g_ir_parser_set_includes (GIrParser *parser,
+ const gchar *const *includes)
{
if (parser->includes)
g_strfreev (parser->includes);
@@ -457,7 +457,7 @@ parse_type_internal (GIrModule *module,
GIrNodeType *type;
char *temporary_type = NULL;
- type = (GIrNodeType *)g_ir_node_new (G_IR_NODE_TYPE, module);
+ type = (GIrNodeType *)_g_ir_node_new (G_IR_NODE_TYPE, module);
type->unparsed = g_strdup (str);
@@ -585,7 +585,7 @@ parse_type_internal (GIrModule *module,
return type;
/* error: */
- g_ir_node_free ((GIrNode *)type);
+ _g_ir_node_free ((GIrNode *)type);
g_free (temporary_type);
return NULL;
}
@@ -748,7 +748,7 @@ start_glib_boxed (GMarkupParseContext *context,
return FALSE;
}
- boxed = (GIrNodeBoxed *) g_ir_node_new (G_IR_NODE_BOXED,
+ boxed = (GIrNodeBoxed *) _g_ir_node_new (G_IR_NODE_BOXED,
ctx->current_module);
((GIrNode *)boxed)->name = g_strdup (name);
@@ -838,7 +838,7 @@ start_function (GMarkupParseContext *context,
if (shadows)
name = shadows;
- function = (GIrNodeFunction *) g_ir_node_new (G_IR_NODE_FUNCTION,
+ function = (GIrNodeFunction *) _g_ir_node_new (G_IR_NODE_FUNCTION,
ctx->current_module);
((GIrNode *)function)->name = g_strdup (name);
@@ -1045,8 +1045,8 @@ start_parameter (GMarkupParseContext *context,
if (name == NULL)
name = "unknown";
- param = (GIrNodeParam *)g_ir_node_new (G_IR_NODE_PARAM,
- ctx->current_module);
+ param = (GIrNodeParam *)_g_ir_node_new (G_IR_NODE_PARAM,
+ ctx->current_module);
ctx->current_typed = (GIrNode*) param;
ctx->current_typed->name = g_strdup (name);
@@ -1201,8 +1201,8 @@ start_field (GMarkupParseContext *context,
return FALSE;
}
- field = (GIrNodeField *)g_ir_node_new (G_IR_NODE_FIELD,
- ctx->current_module);
+ field = (GIrNodeField *)_g_ir_node_new (G_IR_NODE_FIELD,
+ ctx->current_module);
if (introspectable)
{
ctx->current_typed = (GIrNode*) field;
@@ -1268,7 +1268,7 @@ start_field (GMarkupParseContext *context,
{
GIrNodeConstant *constant;
- constant = (GIrNodeConstant *) g_ir_node_new (G_IR_NODE_CONSTANT,
+ constant = (GIrNodeConstant *) _g_ir_node_new (G_IR_NODE_CONSTANT,
ctx->current_module);
((GIrNode *)constant)->name = g_strdup (name);
constant->value = g_strdup (branch);
@@ -1342,10 +1342,10 @@ start_enum (GMarkupParseContext *context,
}
if (strcmp (element_name, "enumeration") == 0)
- enum_ = (GIrNodeEnum *) g_ir_node_new (G_IR_NODE_ENUM,
+ enum_ = (GIrNodeEnum *) _g_ir_node_new (G_IR_NODE_ENUM,
ctx->current_module);
else
- enum_ = (GIrNodeEnum *) g_ir_node_new (G_IR_NODE_FLAGS,
+ enum_ = (GIrNodeEnum *) _g_ir_node_new (G_IR_NODE_FLAGS,
ctx->current_module);
((GIrNode *)enum_)->name = g_strdup (name);
enum_->gtype_name = g_strdup (typename);
@@ -1409,7 +1409,7 @@ start_property (GMarkupParseContext *context,
return FALSE;
}
- property = (GIrNodeProperty *) g_ir_node_new (G_IR_NODE_PROPERTY,
+ property = (GIrNodeProperty *) _g_ir_node_new (G_IR_NODE_PROPERTY,
ctx->current_module);
ctx->current_typed = (GIrNode*) property;
@@ -1492,7 +1492,7 @@ start_member (GMarkupParseContext *context,
return FALSE;
}
- value_ = (GIrNodeValue *) g_ir_node_new (G_IR_NODE_VALUE,
+ value_ = (GIrNodeValue *) _g_ir_node_new (G_IR_NODE_VALUE,
ctx->current_module);
((GIrNode *)value_)->name = g_strdup (name);
@@ -1566,7 +1566,7 @@ start_constant (GMarkupParseContext *context,
return FALSE;
}
- constant = (GIrNodeConstant *) g_ir_node_new (G_IR_NODE_CONSTANT,
+ constant = (GIrNodeConstant *) _g_ir_node_new (G_IR_NODE_CONSTANT,
ctx->current_module);
((GIrNode *)constant)->name = g_strdup (name);
@@ -1639,7 +1639,7 @@ start_errordomain (GMarkupParseContext *context,
return FALSE;
}
- domain = (GIrNodeErrorDomain *) g_ir_node_new (G_IR_NODE_ERROR_DOMAIN,
+ domain = (GIrNodeErrorDomain *) _g_ir_node_new (G_IR_NODE_ERROR_DOMAIN,
ctx->current_module);
((GIrNode *)domain)->name = g_strdup (name);
@@ -1702,7 +1702,7 @@ start_interface (GMarkupParseContext *context,
return FALSE;
}
- iface = (GIrNodeInterface *) g_ir_node_new (G_IR_NODE_INTERFACE,
+ iface = (GIrNodeInterface *) _g_ir_node_new (G_IR_NODE_INTERFACE,
ctx->current_module);
((GIrNode *)iface)->name = g_strdup (name);
iface->gtype_name = g_strdup (typename);
@@ -1778,7 +1778,7 @@ start_class (GMarkupParseContext *context,
return FALSE;
}
- iface = (GIrNodeInterface *) g_ir_node_new (G_IR_NODE_OBJECT,
+ iface = (GIrNodeInterface *) _g_ir_node_new (G_IR_NODE_OBJECT,
ctx->current_module);
((GIrNode *)iface)->name = g_strdup (name);
iface->gtype_name = g_strdup (typename);
@@ -1915,8 +1915,8 @@ start_type (GMarkupParseContext *context,
const char *len;
const char *size;
- typenode = (GIrNodeType *)g_ir_node_new (G_IR_NODE_TYPE,
- ctx->current_module);
+ typenode = (GIrNodeType *)_g_ir_node_new (G_IR_NODE_TYPE,
+ ctx->current_module);
typenode->tag = GI_TYPE_TAG_ARRAY;
typenode->is_pointer = TRUE;
@@ -2194,8 +2194,8 @@ start_return_value (GMarkupParseContext *context,
ctx->state == STATE_FUNCTION))
return FALSE;
- param = (GIrNodeParam *)g_ir_node_new (G_IR_NODE_PARAM,
- ctx->current_module);
+ param = (GIrNodeParam *)_g_ir_node_new (G_IR_NODE_PARAM,
+ ctx->current_module);
param->in = FALSE;
param->out = FALSE;
param->retval = TRUE;
@@ -2305,8 +2305,8 @@ start_glib_signal (GMarkupParseContext *context,
MISSING_ATTRIBUTE (context, error, element_name, "name");
return FALSE;
}
- signal = (GIrNodeSignal *)g_ir_node_new (G_IR_NODE_SIGNAL,
- ctx->current_module);
+ signal = (GIrNodeSignal *)_g_ir_node_new (G_IR_NODE_SIGNAL,
+ ctx->current_module);
((GIrNode *)signal)->name = g_strdup (name);
@@ -2387,8 +2387,8 @@ start_vfunc (GMarkupParseContext *context,
return FALSE;
}
- vfunc = (GIrNodeVFunc *)g_ir_node_new (G_IR_NODE_VFUNC,
- ctx->current_module);
+ vfunc = (GIrNodeVFunc *)_g_ir_node_new (G_IR_NODE_VFUNC,
+ ctx->current_module);
((GIrNode *)vfunc)->name = g_strdup (name);
@@ -2484,7 +2484,7 @@ start_struct (GMarkupParseContext *context,
return FALSE;
}
- struct_ = (GIrNodeStruct *) g_ir_node_new (G_IR_NODE_STRUCT,
+ struct_ = (GIrNodeStruct *) _g_ir_node_new (G_IR_NODE_STRUCT,
ctx->current_module);
((GIrNode *)struct_)->name = g_strdup (name ? name : "");
@@ -2545,7 +2545,7 @@ start_union (GMarkupParseContext *context,
return FALSE;
}
- union_ = (GIrNodeUnion *) g_ir_node_new (G_IR_NODE_UNION,
+ union_ = (GIrNodeUnion *) _g_ir_node_new (G_IR_NODE_UNION,
ctx->current_module);
((GIrNode *)union_)->name = g_strdup (name ? name : "");
@@ -2654,7 +2654,7 @@ parse_include (GMarkupParseContext *context,
return FALSE;
}
- module = g_ir_parser_parse_string (ctx->parser, name, girpath, buffer, length, &error);
+ module = _g_ir_parser_parse_string (ctx->parser, name, girpath, buffer, length, &error);
g_free (buffer);
if (error != NULL)
{
@@ -2890,7 +2890,7 @@ start_element_handler (GMarkupParseContext *context,
"<namespace/> name element '%s' doesn't match file name '%s'",
name, ctx->namespace);
- ctx->current_module = g_ir_module_new (name, version, shared_library, cprefix);
+ ctx->current_module = _g_ir_module_new (name, version, shared_library, cprefix);
ctx->current_module->aliases = ctx->aliases;
ctx->aliases = NULL;
@@ -2898,7 +2898,7 @@ start_element_handler (GMarkupParseContext *context,
ctx->disguised_structures = NULL;
for (l = ctx->include_modules; l; l = l->next)
- g_ir_module_add_include_module (ctx->current_module, l->data);
+ _g_ir_module_add_include_module (ctx->current_module, l->data);
g_list_free (ctx->include_modules);
ctx->include_modules = NULL;
@@ -3445,7 +3445,7 @@ cleanup (GMarkupParseContext *context,
GList *m;
for (m = ctx->modules; m; m = m->next)
- g_ir_module_free (m->data);
+ _g_ir_module_free (m->data);
g_list_free (ctx->modules);
ctx->modules = NULL;
@@ -3453,7 +3453,7 @@ cleanup (GMarkupParseContext *context,
}
/**
- * g_ir_parser_parse_string:
+ * _g_ir_parser_parse_string:
* @parser: a #GIrParser
* @namespace: the namespace of the string
* @filename: (allow-none): Path to parsed file, or %NULL
@@ -3467,12 +3467,12 @@ cleanup (GMarkupParseContext *context,
* Returns: (transfer none): a new #GirModule
*/
GIrModule *
-g_ir_parser_parse_string (GIrParser *parser,
- const gchar *namespace,
- const gchar *filename,
- const gchar *buffer,
- gssize length,
- GError **error)
+_g_ir_parser_parse_string (GIrParser *parser,
+ const gchar *namespace,
+ const gchar *filename,
+ const gchar *buffer,
+ gssize length,
+ GError **error)
{
ParseContext ctx = { 0 };
GMarkupParseContext *context;
@@ -3531,7 +3531,7 @@ g_ir_parser_parse_string (GIrParser *parser,
}
/**
- * g_ir_parser_parse_file:
+ * _g_ir_parser_parse_file:
* @parser: a #GIrParser
* @filename: filename to parse
* @error: return location for a #GError, or %NULL
@@ -3543,9 +3543,9 @@ g_ir_parser_parse_string (GIrParser *parser,
* are owned by the #GIrParser and will be freed along with the parser.
*/
GIrModule *
-g_ir_parser_parse_file (GIrParser *parser,
- const gchar *filename,
- GError **error)
+_g_ir_parser_parse_file (GIrParser *parser,
+ const gchar *filename,
+ GError **error)
{
gchar *buffer;
gsize length;
@@ -3580,7 +3580,7 @@ g_ir_parser_parse_file (GIrParser *parser,
if (!g_file_get_contents (filename, &buffer, &length, error))
return NULL;
- module = g_ir_parser_parse_string (parser, namespace, filename, buffer, length, error);
+ module = _g_ir_parser_parse_string (parser, namespace, filename, buffer, length, error);
g_free (namespace);
diff --git a/girepository/girparser.h b/girepository/girparser.h
index 076c981..e56c63b 100644
--- a/girepository/girparser.h
+++ b/girepository/girparser.h
@@ -29,20 +29,20 @@ G_BEGIN_DECLS
typedef struct _GIrParser GIrParser;
-GIrParser *g_ir_parser_new (void);
-void g_ir_parser_free (GIrParser *parser);
-void g_ir_parser_set_includes (GIrParser *parser,
- const gchar *const *includes);
-
-GIrModule *g_ir_parser_parse_string (GIrParser *parser,
- const gchar *namespace,
- const gchar *filename,
- const gchar *buffer,
- gssize length,
- GError **error);
-GIrModule *g_ir_parser_parse_file (GIrParser *parser,
- const gchar *filename,
- GError **error);
+GIrParser *_g_ir_parser_new (void);
+void _g_ir_parser_free (GIrParser *parser);
+void _g_ir_parser_set_includes (GIrParser *parser,
+ const gchar *const *includes);
+
+GIrModule *_g_ir_parser_parse_string (GIrParser *parser,
+ const gchar *namespace,
+ const gchar *filename,
+ const gchar *buffer,
+ gssize length,
+ GError **error);
+GIrModule *_g_ir_parser_parse_file (GIrParser *parser,
+ const gchar *filename,
+ GError **error);
G_END_DECLS
diff --git a/tools/compiler.c b/tools/compiler.c
index 8306c7d..7432760 100644
--- a/tools/compiler.c
+++ b/tools/compiler.c
@@ -174,11 +174,11 @@ main (int argc, char ** argv)
for (i = 0; includedirs[i]; i++)
g_irepository_prepend_search_path (includedirs[i]);
- parser = g_ir_parser_new ();
+ parser = _g_ir_parser_new ();
- g_ir_parser_set_includes (parser, (const char*const*) includedirs);
+ _g_ir_parser_set_includes (parser, (const char*const*) includedirs);
- module = g_ir_parser_parse_file (parser, input[0], &error);
+ module = _g_ir_parser_parse_file (parser, input[0], &error);
if (module == NULL)
{
g_fprintf (stderr, "error parsing file %s: %s\n",
@@ -203,7 +203,7 @@ main (int argc, char ** argv)
g_debug ("[building] module %s", module->name);
- typelib = g_ir_module_build_typelib (module);
+ typelib = _g_ir_module_build_typelib (module);
if (typelib == NULL)
g_error ("Failed to build typelib for module '%s'\n", module->name);
if (!g_typelib_validate (typelib, &error))
@@ -219,7 +219,7 @@ main (int argc, char ** argv)
#if 0
/* No point */
- g_ir_parser_free (parser);
+ _g_ir_parser_free (parser);
#endif
return 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]