summaryrefslogtreecommitdiff
path: root/girepository/girnode.h
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-07-26 16:26:46 -0400
committerColin Walters <walters@verbum.org>2010-08-17 13:14:51 -0400
commit8942500c99de223eff6f91677a5dff206e09b3a7 (patch)
tree67b89e622e14874635a7fa9268ac12e16d363f31 /girepository/girnode.h
parent616a918019f730184bc7aee0f4570a67db8850b9 (diff)
downloadgobject-introspection-8942500c99de223eff6f91677a5dff206e09b3a7.tar.gz
[gircompiler] Clean up parsing
We never actually include multiple modules in the compiler, so just nuke that. Also rather than passing around GIrModule consistently pass around a GIrTypelibBuild structure which has various things. This lets us maintain a stack there which we can walk for better error messages. Also, fix up the node lookup in giroffsets.c; previously it didn't really handle includes correctly. We really need to switch to always using Foo.Bar (i.e. GIName) names internally...
Diffstat (limited to 'girepository/girnode.h')
-rw-r--r--girepository/girnode.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/girepository/girnode.h b/girepository/girnode.h
index dcd8fa49..edb94008 100644
--- a/girepository/girnode.h
+++ b/girepository/girnode.h
@@ -27,7 +27,6 @@
G_BEGIN_DECLS
-typedef struct _GIrTypelibBuild GIrTypelibBuild;
typedef struct _GIrNode GIrNode;
typedef struct _GIrNodeFunction GIrNodeFunction;
typedef struct _GIrNodeParam GIrNodeParam;
@@ -46,16 +45,6 @@ typedef struct _GIrNodeErrorDomain GIrNodeErrorDomain;
typedef struct _GIrNodeXRef GIrNodeXRef;
typedef struct _GIrNodeUnion GIrNodeUnion;
-struct _GIrTypelibBuild {
- GIrModule *module;
- GList *modules;
- GHashTable *strings;
- GHashTable *types;
- GList *nodes_with_attributes;
- guint32 n_attributes;
- guchar *data;
-};
-
typedef enum
{
G_IR_NODE_INVALID = 0,
@@ -84,6 +73,7 @@ struct _GIrNode
{
GIrNodeTypeId type;
gchar *name;
+ GIrModule *module;
guint32 offset; /* Assigned as we build the typelib */
@@ -364,7 +354,8 @@ 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);
@@ -386,17 +377,14 @@ guint32 write_string (const gchar *str,
const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
const gchar * g_ir_node_type_to_string (GIrNodeTypeId type);
-gboolean g_ir_find_node (GIrModule *module,
- GList *modules,
- const char *name,
- GIrNode **node_out,
- GIrModule **module_out);
+GIrNode *g_ir_find_node (GIrTypelibBuild *build,
+ GIrModule *module,
+ const char *name);
/* In giroffsets.c */
-void g_ir_node_compute_offsets (GIrNode *node,
- GIrModule *module,
- GList *modules);
+void g_ir_node_compute_offsets (GIrTypelibBuild *build,
+ GIrNode *node);
G_END_DECLS