gobject-introspection r299 - branches/gir-compiler/tools



Author: walters
Date: Tue Aug  5 15:12:11 2008
New Revision: 299
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=299&view=rev

Log:
Rename some things to use GIR instead of GIDL (Phillip Van Hoof, Colin Walters)



Added:
   branches/gir-compiler/tools/girmodule.c
      - copied unchanged from r298, /branches/gir-compiler/tools/gidlmodule.c
   branches/gir-compiler/tools/girmodule.h
      - copied unchanged from r298, /branches/gir-compiler/tools/gidlmodule.h
   branches/gir-compiler/tools/girnode.c
      - copied unchanged from r298, /branches/gir-compiler/tools/gidlnode.c
   branches/gir-compiler/tools/girnode.h
      - copied, changed from r298, /branches/gir-compiler/tools/gidlnode.h
   branches/gir-compiler/tools/girparser.c
      - copied, changed from r298, /branches/gir-compiler/tools/gidlparser.c
   branches/gir-compiler/tools/girparser.h
      - copied, changed from r298, /branches/gir-compiler/tools/gidlparser.h
   branches/gir-compiler/tools/girwriter.c
      - copied unchanged from r298, /branches/gir-compiler/tools/gidlwriter.c
   branches/gir-compiler/tools/girwriter.h
      - copied unchanged from r298, /branches/gir-compiler/tools/gidlwriter.h
Removed:
   branches/gir-compiler/tools/gidlmodule.c
   branches/gir-compiler/tools/gidlmodule.h
   branches/gir-compiler/tools/gidlnode.c
   branches/gir-compiler/tools/gidlnode.h
   branches/gir-compiler/tools/gidlparser.c
   branches/gir-compiler/tools/gidlparser.h
   branches/gir-compiler/tools/gidlwriter.c
   branches/gir-compiler/tools/gidlwriter.h
Modified:
   branches/gir-compiler/tools/Makefile.am

Modified: branches/gir-compiler/tools/Makefile.am
==============================================================================
--- branches/gir-compiler/tools/Makefile.am	(original)
+++ branches/gir-compiler/tools/Makefile.am	Tue Aug  5 15:12:11 2008
@@ -8,29 +8,29 @@
 EXTRA_DIST = g-ir-scanner
 
 noinst_LTLIBRARIES = libgirepository-parser.la
-bin_PROGRAMS = g-idl-compiler g-idl-generate
+bin_PROGRAMS = g-ir-compiler g-ir-generate
 bin_SCRIPTS = g-ir-scanner
 
 libgirepository_parser_la_SOURCES =		\
-	gidlmodule.c				\
-	gidlmodule.h				\
-	gidlnode.c				\
-	gidlnode.h				\
-	gidlparser.c				\
-	gidlparser.h
+	girmodule.c				\
+	girmodule.h				\
+	girnode.c				\
+	girnode.h				\
+	girparser.c				\
+	girparser.h
 libgirepository_parser_la_CFLAGS = $(GIREPO_CFLAGS)
 
-g_idl_compiler_SOURCES = compiler.c	
-g_idl_compiler_CFLAGS = $(GIREPO_CFLAGS)
-g_idl_compiler_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la libgirepository-parser.la
-
-g_idl_generate_SOURCES = generate.c
-g_idl_generate_CFLAGS = $(GIREPO_CFLAGS)
-g_idl_generate_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
+g_ir_compiler_SOURCES = compiler.c	
+g_ir_compiler_CFLAGS = $(GIREPO_CFLAGS)
+g_ir_compiler_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la libgirepository-parser.la
+
+g_ir_generate_SOURCES = generate.c
+g_ir_generate_CFLAGS = $(GIREPO_CFLAGS)
+g_ir_generate_LDADD = $(GIREPO_LIBS) $(top_builddir)/girepository/libgirepository.la
 
 GCOVSOURCES =					\
 	$(libgirepository_la_SOURCES)		\
-	$(g_idl_compiler_SOURCES)		\
-	$(g_idl_generate_SOURCES)
+	$(g_ir_compiler_SOURCES)		\
+	$(g_ir_generate_SOURCES)
 
 include $(top_srcdir)/gcov.mak

Copied: branches/gir-compiler/tools/girnode.h (from r298, /branches/gir-compiler/tools/gidlnode.h)
==============================================================================
--- /branches/gir-compiler/tools/gidlnode.h	(original)
+++ branches/gir-compiler/tools/girnode.h	Tue Aug  5 15:12:11 2008
@@ -1,4 +1,4 @@
-/* GObject introspection: Parsed IDL
+/* GObject introspection: Parsed GIR
  *
  * Copyright (C) 2005 Matthias Clasen
  *
@@ -18,71 +18,71 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __G_IDL_NODE_H__
-#define __G_IDL_NODE_H__
+#ifndef __G_IR_NODE_H__
+#define __G_IR_NODE_H__
 
 #include <glib.h>
 
 G_BEGIN_DECLS
 
-typedef struct _GIdlNode GIdlNode; 
-typedef struct _GIdlNodeFunction GIdlNodeFunction;
-typedef struct _GIdlNodeParam GIdlNodeParam;
-typedef struct _GIdlNodeType GIdlNodeType;
-typedef struct _GIdlNodeInterface GIdlNodeInterface;
-typedef struct _GIdlNodeSignal GIdlNodeSignal;
-typedef struct _GIdlNodeProperty GIdlNodeProperty;
-typedef struct _GIdlNodeVFunc GIdlNodeVFunc;
-typedef struct _GIdlNodeField GIdlNodeField;
-typedef struct _GIdlNodeValue GIdlNodeValue;
-typedef struct _GIdlNodeEnum GIdlNodeEnum;
-typedef struct _GIdlNodeBoxed GIdlNodeBoxed;
-typedef struct _GIdlNodeStruct GIdlNodeStruct;
-typedef struct _GIdlNodeConstant GIdlNodeConstant;
-typedef struct _GIdlNodeErrorDomain GIdlNodeErrorDomain;
-typedef struct _GIdlNodeXRef GIdlNodeXRef;
-typedef struct _GIdlNodeUnion GIdlNodeUnion;
+typedef struct _GIrNode GIrNode; 
+typedef struct _GIrNodeFunction GIrNodeFunction;
+typedef struct _GIrNodeParam GIrNodeParam;
+typedef struct _GIrNodeType GIrNodeType;
+typedef struct _GIrNodeInterface GIrNodeInterface;
+typedef struct _GIrNodeSignal GIrNodeSignal;
+typedef struct _GIrNodeProperty GIrNodeProperty;
+typedef struct _GIrNodeVFunc GIrNodeVFunc;
+typedef struct _GIrNodeField GIrNodeField;
+typedef struct _GIrNodeValue GIrNodeValue;
+typedef struct _GIrNodeEnum GIrNodeEnum;
+typedef struct _GIrNodeBoxed GIrNodeBoxed;
+typedef struct _GIrNodeStruct GIrNodeStruct;
+typedef struct _GIrNodeConstant GIrNodeConstant;
+typedef struct _GIrNodeErrorDomain GIrNodeErrorDomain;
+typedef struct _GIrNodeXRef GIrNodeXRef;
+typedef struct _GIrNodeUnion GIrNodeUnion;
 
 typedef enum 
 {
-  G_IDL_NODE_INVALID,
-  G_IDL_NODE_FUNCTION,
-  G_IDL_NODE_CALLBACK,
-  G_IDL_NODE_STRUCT,
-  G_IDL_NODE_BOXED,
-  G_IDL_NODE_ENUM,
-  G_IDL_NODE_FLAGS,
-  G_IDL_NODE_OBJECT,
-  G_IDL_NODE_INTERFACE,
-  G_IDL_NODE_CONSTANT,
-  G_IDL_NODE_ERROR_DOMAIN,
-  G_IDL_NODE_UNION,
-  G_IDL_NODE_PARAM,
-  G_IDL_NODE_TYPE,
-  G_IDL_NODE_PROPERTY,
-  G_IDL_NODE_SIGNAL,
-  G_IDL_NODE_VALUE,
-  G_IDL_NODE_VFUNC,
-  G_IDL_NODE_FIELD,
-  G_IDL_NODE_XREF
-} GIdlNodeTypeId;
+  G_IR_NODE_INVALID,
+  G_IR_NODE_FUNCTION,
+  G_IR_NODE_CALLBACK,
+  G_IR_NODE_STRUCT,
+  G_IR_NODE_BOXED,
+  G_IR_NODE_ENUM,
+  G_IR_NODE_FLAGS,
+  G_IR_NODE_OBJECT,
+  G_IR_NODE_INTERFACE,
+  G_IR_NODE_CONSTANT,
+  G_IR_NODE_ERROR_DOMAIN,
+  G_IR_NODE_UNION,
+  G_IR_NODE_PARAM,
+  G_IR_NODE_TYPE,
+  G_IR_NODE_PROPERTY,
+  G_IR_NODE_SIGNAL,
+  G_IR_NODE_VALUE,
+  G_IR_NODE_VFUNC,
+  G_IR_NODE_FIELD,
+  G_IR_NODE_XREF
+} GIrNodeTypeId;
 
-struct _GIdlNode
+struct _GIrNode
 {
-  GIdlNodeTypeId type;
+  GIrNodeTypeId type;
   gchar *name;
 };
 
-struct _GIdlNodeXRef
+struct _GIrNodeXRef
 {
-  GIdlNode node;
+  GIrNode node;
 
   gchar *namespace;
 };
 
-struct _GIdlNodeFunction
+struct _GIrNodeFunction
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
@@ -94,13 +94,13 @@
 
   gchar *symbol;
 
-  GIdlNodeParam *result;
+  GIrNodeParam *result;
   GList *parameters;
 };
 
-struct _GIdlNodeType 
+struct _GIrNodeType 
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean is_pointer;
   gboolean is_basic;
@@ -118,16 +118,16 @@
   gboolean has_length;
   gint length;
   
-  GIdlNodeType *parameter_type1;
-  GIdlNodeType *parameter_type2;  
+  GIrNodeType *parameter_type1;
+  GIrNodeType *parameter_type2;  
 
   gchar *interface;
   gchar **errors;
 };
 
-struct _GIdlNodeParam 
+struct _GIrNodeParam 
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean in;
   gboolean out;
@@ -138,12 +138,12 @@
   gboolean transfer;
   gboolean shallow_transfer;
   
-  GIdlNodeType *type;
+  GIrNodeType *type;
 };
 
-struct _GIdlNodeProperty
+struct _GIrNodeProperty
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
@@ -153,12 +153,12 @@
   gboolean construct;
   gboolean construct_only;
   
-  GIdlNodeType *type;
+  GIrNodeType *type;
 };
 
-struct _GIdlNodeSignal 
+struct _GIrNodeSignal 
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
@@ -176,12 +176,12 @@
   gint class_closure;
   
   GList *parameters;
-  GIdlNodeParam *result;    
+  GIrNodeParam *result;    
 };
 
-struct _GIdlNodeVFunc 
+struct _GIrNodeVFunc 
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean must_chain_up;
   gboolean must_be_implemented;
@@ -189,26 +189,26 @@
   gboolean is_class_closure;
   
   GList *parameters;
-  GIdlNodeParam *result;      
+  GIrNodeParam *result;      
 
   gint offset;
 };
 
-struct _GIdlNodeField
+struct _GIrNodeField
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean readable;
   gboolean writable;
   gint bits;
   gint offset;
   
-  GIdlNodeType *type;
+  GIrNodeType *type;
 };
 
-struct _GIdlNodeInterface
+struct _GIrNodeInterface
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
@@ -223,29 +223,29 @@
   GList *members;
 };
 
-struct _GIdlNodeValue
+struct _GIrNodeValue
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
   guint32 value;
 };
 
-struct _GIdlNodeConstant
+struct _GIrNodeConstant
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
-  GIdlNodeType *type;
+  GIrNodeType *type;
   
   gchar *value;
 };
 
-struct _GIdlNodeEnum
+struct _GIrNodeEnum
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
@@ -255,9 +255,9 @@
   GList *values;
 };
 
-struct _GIdlNodeBoxed
+struct _GIrNodeBoxed
 { 
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
 
@@ -267,18 +267,18 @@
   GList *members;
 };
 
-struct _GIdlNodeStruct
+struct _GIrNodeStruct
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
   
   GList *members;
 };
 
-struct _GIdlNodeUnion
+struct _GIrNodeUnion
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
   
@@ -289,13 +289,13 @@
   gchar *gtype_init;
 
   gint discriminator_offset;
-  GIdlNodeType *discriminator_type;
+  GIrNodeType *discriminator_type;
 };
 
 
-struct _GIdlNodeErrorDomain
+struct _GIrNodeErrorDomain
 {
-  GIdlNode node;
+  GIrNode node;
 
   gboolean deprecated;
   
@@ -305,11 +305,11 @@
 };
 
 
-GIdlNode *g_idl_node_new             (GIdlNodeTypeId type);
-void      g_idl_node_free            (GIdlNode    *node);
-guint32   g_idl_node_get_size        (GIdlNode    *node);
-guint32   g_idl_node_get_full_size   (GIdlNode    *node);
-void      g_idl_node_build_metadata  (GIdlNode    *node,
+GIrNode * g_ir_node_new             (GIrNodeTypeId type);
+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_metadata  (GIrNode    *node,
 				      GIdlModule  *module,
 				      GList       *modules,
                                       GHashTable  *strings,
@@ -317,18 +317,18 @@
 				      guchar      *data,
 				      guint32     *offset,
                                       guint32     *offset2);
-int       g_idl_node_cmp             (GIdlNode    *node,
-				      GIdlNode    *other);
-gboolean  g_idl_node_can_have_member (GIdlNode    *node);
-void      g_idl_node_add_member      (GIdlNode         *node,
-				      GIdlNodeFunction *member);
+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_idl_node_param_direction_string (GIdlNodeParam * node);
+const gchar * g_ir_node_param_direction_string (GIrNodeParam * node);
 
 G_END_DECLS
 
-#endif  /* __G_IDL_NODE_H__ */
+#endif  /* __G_IR_NODE_H__ */

Copied: branches/gir-compiler/tools/girparser.c (from r298, /branches/gir-compiler/tools/gidlparser.c)
==============================================================================
--- /branches/gir-compiler/tools/gidlparser.c	(original)
+++ branches/gir-compiler/tools/girparser.c	Tue Aug  5 15:12:11 2008
@@ -1,6 +1,6 @@
-/* GObject introspection: A parser for the XML IDL format
+/* GObject introspection: A parser for the XML GIR format
  *
- * Copyright (C) 2005 Matthias Clasen
+ * Copyright (C) 2008 Philip Van Hoof
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
@@ -31,15 +31,16 @@
 {
   STATE_START,
   STATE_END,
-  STATE_ROOT,
+  STATE_REPOSITORY,
   STATE_NAMESPACE,
+  STATE_ENUM,
+  STATE_BITFIELD,
   STATE_FUNCTION,
   STATE_PARAMETERS,
   STATE_OBJECT,
   STATE_INTERFACE,
   STATE_IMPLEMENTS,
   STATE_REQUIRES,
-  STATE_ENUM,
   STATE_BOXED,
   STATE_STRUCT,
   STATE_SIGNAL,
@@ -380,16 +381,16 @@
       const gchar *deprecated;
       
       name = find_attribute ("name", attribute_names, attribute_values);
-      typename = find_attribute ("type-name", attribute_names, attribute_values);
-      typeinit = find_attribute ("get-type", attribute_names, attribute_values);
+      typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+      typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
       deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
       
       if (name == NULL)
 	MISSING_ATTRIBUTE (error, element_name, "name");
       else if (typename == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "type-name");
+	MISSING_ATTRIBUTE (error, element_name, "glib:type-name");
       else if (typeinit == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "get-type");
+	MISSING_ATTRIBUTE (error, element_name, "glib:get-type");
       else
 	{
 	  GIdlNodeBoxed *boxed;
@@ -444,14 +445,14 @@
       const gchar *type;
       
       name = find_attribute ("name", attribute_names, attribute_values);
-      symbol = find_attribute ("symbol", attribute_names, attribute_values);
+      symbol = find_attribute ("c:identifier", attribute_names, attribute_values);
       deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
       type = find_attribute ("type", attribute_names, attribute_values);
       
       if (name == NULL)
 	MISSING_ATTRIBUTE (error, element_name, "name");
       else if (strcmp (element_name, "callback") != 0 && symbol == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "symbol");
+	MISSING_ATTRIBUTE (error, element_name, "c:identifier");
       else
 	{
 	  GIdlNodeFunction *function;
@@ -812,8 +813,8 @@
       const gchar *deprecated;
       
       name = find_attribute ("name", attribute_names, attribute_values);
-      typename = find_attribute ("type-name", attribute_names, attribute_values);
-      typeinit = find_attribute ("get-type", attribute_names, attribute_values);
+      typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+      typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
       deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
       
       if (name == NULL)
@@ -1118,16 +1119,16 @@
       const gchar *deprecated;
       
       name = find_attribute ("name", attribute_names, attribute_values);
-      typename = find_attribute ("type-name", attribute_names, attribute_values);
-      typeinit = find_attribute ("get-type", attribute_names, attribute_values);
+      typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+      typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
       deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
       
       if (name == NULL)
 	MISSING_ATTRIBUTE (error, element_name, "name");
       else if (typename == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "type-name");
+	MISSING_ATTRIBUTE (error, element_name, "glib:type-name");
       else if (typeinit == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "get-type");
+	MISSING_ATTRIBUTE (error, element_name, "glib:get-type");
       else
 	{
 	  GIdlNodeInterface *iface;
@@ -1155,14 +1156,14 @@
 }
 
 static gboolean
-start_object (GMarkupParseContext *context,
+start_class (GMarkupParseContext *context,
 	      const gchar         *element_name,
 	      const gchar        **attribute_names,
 	      const gchar        **attribute_values,
 	      ParseContext        *ctx,
 	      GError             **error)
 {
-  if (strcmp (element_name, "object") == 0 &&
+  if (strcmp (element_name, "class") == 0 &&
       ctx->state == STATE_NAMESPACE)
     {
       const gchar *name;
@@ -1173,16 +1174,16 @@
       
       name = find_attribute ("name", attribute_names, attribute_values);
       parent = find_attribute ("parent", attribute_names, attribute_values);
-      typename = find_attribute ("type-name", attribute_names, attribute_values);
-      typeinit = find_attribute ("get-type", attribute_names, attribute_values);
+      typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+      typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
       deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
       
       if (name == NULL)
 	MISSING_ATTRIBUTE (error, element_name, "name");
       else if (typename == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "type-name");
+	MISSING_ATTRIBUTE (error, element_name, "glib:type-name");
       else if (typeinit == NULL)
-	MISSING_ATTRIBUTE (error, element_name, "get-type");
+	MISSING_ATTRIBUTE (error, element_name, "glib:get-type");
       else
 	{
 	  GIdlNodeInterface *iface;
@@ -1299,7 +1300,7 @@
 	      ParseContext       *ctx,
 	      GError             **error)
 {
-  if (strcmp (element_name, "signal") == 0 && 
+  if (strcmp (element_name, "glib:signal") == 0 && 
       (ctx->state == STATE_OBJECT ||
        ctx->state == STATE_INTERFACE))
     {
@@ -1515,8 +1516,8 @@
       
       name = find_attribute ("name", attribute_names, attribute_values);
       deprecated = find_attribute ("deprecated", attribute_names, attribute_values);
-      typename = find_attribute ("type-name", attribute_names, attribute_values);
-      typeinit = find_attribute ("get-type", attribute_names, attribute_values);
+      typename = find_attribute ("glib:type-name", attribute_names, attribute_values);
+      typeinit = find_attribute ("glib:get-type", attribute_names, attribute_values);
       
       if (name == NULL)
 	MISSING_ATTRIBUTE (error, element_name, "name");
@@ -1589,10 +1590,10 @@
   ParseContext *ctx = user_data;
   gint line_number, char_number;
 
-  switch (element_name[0])
+  switch (element_name[0]) 
     {
-    case 'a':
-      if (strcmp (element_name, "api") == 0 && ctx->state == STATE_START)
+    case 'r':
+      if (strcmp (element_name, "repository") == 0 && ctx->state == STATE_START)
 	{
 	  const gchar *version;
 
@@ -1607,7 +1608,7 @@
 			 "Unsupported version '%s'",
 			 version);
 	  else
-	    ctx->state = STATE_ROOT;
+	    ctx->state = STATE_NAMESPACE;
 	  
 	  goto out;
 	}
@@ -1750,12 +1751,12 @@
 	}
       break;
 
-    case 'o':
-      if (start_object (context, element_name, 
+    case 'c':
+      if (start_class (context, element_name, 
 			attribute_names, attribute_values,
 			ctx, error))
 	goto out;
-      else if (strcmp (element_name, "object") == 0 &&
+      else if (strcmp (element_name, "class") == 0 &&
 	       ctx->state == STATE_REQUIRES)
 	{
 	  const gchar *name;
@@ -1865,7 +1866,7 @@
       /* no need to GError here, GMarkup already catches this */
       break;
 
-    case STATE_ROOT:
+    case STATE_REPOSITORY:
       ctx->state = STATE_END;
       break;
 
@@ -1873,7 +1874,7 @@
       if (strcmp (element_name, "namespace") == 0)
 	{
           ctx->current_module = NULL;
-          ctx->state = STATE_ROOT;
+          ctx->state = STATE_NAMESPACE;
         }
       break;
 
@@ -1903,7 +1904,7 @@
       break;
 
     case STATE_OBJECT:
-      if (strcmp (element_name, "object") == 0)
+      if (strcmp (element_name, "class") == 0)
 	{
 	  ctx->current_node = NULL;
 	  ctx->state = STATE_NAMESPACE;
@@ -2011,9 +2012,9 @@
 };
 
 GList * 
-g_idl_parse_string (const gchar  *buffer, 
-		    gssize        length,
-                    GError      **error)
+g_ir_parse_string (const gchar  *buffer, 
+		   gssize        length,
+		   GError      **error)
 {
   ParseContext ctx = { 0 };
   GMarkupParseContext *context;
@@ -2035,8 +2036,8 @@
 }
 
 GList *
-g_idl_parse_file (const gchar  *filename,
-		  GError      **error)
+g_ir_parse_file (const gchar  *filename,
+		 GError      **error)
 {
   gchar *buffer;
   gsize length;
@@ -2045,7 +2046,7 @@
   if (!g_file_get_contents (filename, &buffer, &length, error))
     return NULL;
   
-  modules = g_idl_parse_string (buffer, length, error);
+  modules = g_ir_parse_string (buffer, length, error);
 
   g_free (buffer);
 

Copied: branches/gir-compiler/tools/girparser.h (from r298, /branches/gir-compiler/tools/gidlparser.h)
==============================================================================
--- /branches/gir-compiler/tools/gidlparser.h	(original)
+++ branches/gir-compiler/tools/girparser.h	Tue Aug  5 15:12:11 2008
@@ -1,4 +1,4 @@
-/* GObject introspection: A parser for the XML IDL format
+/* GObject introspection: A parser for the XML GIR format
  *
  * Copyright (C) 2005 Matthias Clasen
  *
@@ -18,21 +18,21 @@
  * Boston, MA 02111-1307, USA.
  */
 
-#ifndef __G_IDL_PARSER_H__
-#define __G_IDL_PARSER_H__
+#ifndef __G_GIR_PARSER_H__
+#define __G_GIR_PARSER_H__
 
 #include <glib.h>
 
 G_BEGIN_DECLS
 
 
-GList *g_idl_parse_string (const gchar  *buffer, 
-			   gssize        length,
-			   GError      **error);
-GList *g_idl_parse_file   (const gchar  *filename,
-			   GError      **error);
+GList *g_ir_parse_string (const gchar  *buffer, 
+			  gssize        length,
+			  GError      **error);
+GList *g_ir_parse_file   (const gchar  *filename,
+			  GError      **error);
 
 
 G_END_DECLS
 
-#endif  /* __G_IDL_PARSER_H__ */
+#endif  /* __G_GIR_PARSER_H__ */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]