gobject-introspection r706 - in trunk: . girepository



Author: jobi
Date: Tue Oct 14 22:25:13 2008
New Revision: 706
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=706&view=rev

Log:

2008-10-14  Johan Bilien  <jobi via ecp fr>

	* girepository/ginfo.c, girepository/girepository.h: add
	g_union_info_find_method



Modified:
   trunk/ChangeLog
   trunk/girepository/ginfo.c
   trunk/girepository/girepository.h

Modified: trunk/girepository/ginfo.c
==============================================================================
--- trunk/girepository/ginfo.c	(original)
+++ trunk/girepository/ginfo.c	Tue Oct 14 22:25:13 2008
@@ -1838,3 +1838,19 @@
 
   return NULL;
 }
+
+GIFunctionInfo *
+g_union_info_find_method (GIUnionInfo *info,
+                          const gchar *name)
+{
+  gint offset;
+  GIBaseInfo *base = (GIBaseInfo *)info;
+  Header *header = (Header *)base->typelib->data;
+  StructBlob *blob = (UnionBlob *)&base->typelib->data[base->offset];
+
+  offset = base->offset + header->union_blob_size
+    + blob->n_fields * header->field_blob_size;
+
+  return find_method (base, offset, blob->n_methods, name);
+}
+

Modified: trunk/girepository/girepository.h
==============================================================================
--- trunk/girepository/girepository.h	(original)
+++ trunk/girepository/girepository.h	Tue Oct 14 22:25:13 2008
@@ -362,6 +362,8 @@
 GITypeInfo *           g_union_info_get_discriminator_type (GIUnionInfo *info);
 GIConstantInfo *       g_union_info_get_discriminator      (GIUnionInfo *info,
 					                    gint         n);
+GIFunctionInfo *       g_union_info_find_method    (GIUnionInfo *info,
+                                                    const gchar *name);
 
 
 /* GIStructInfo */



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