gobject-introspection r940 - in trunk: . giscanner tests/scanner
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r940 - in trunk: . giscanner tests/scanner
- Date: Mon, 17 Nov 2008 22:07:26 +0000 (UTC)
Author: danw
Date: Mon Nov 17 22:07:26 2008
New Revision: 940
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=940&view=rev
Log:
* giscanner/glibtransformer.py (GLibTransformer.__init__): fix
spelling of GHashTable. #561135
* tests/scanner/annotation.c (annotation_object_get_hash):
* tests/scanner/annotation-1.0-expected.gir:
* tests/scanner/annotation-1.0-expected.tgir: add a test of
GHashTable annotations
Modified:
trunk/ChangeLog
trunk/giscanner/glibtransformer.py
trunk/tests/scanner/annotation-1.0-expected.gir
trunk/tests/scanner/annotation-1.0-expected.tgir
trunk/tests/scanner/annotation.c
trunk/tests/scanner/annotation.h
Modified: trunk/giscanner/glibtransformer.py
==============================================================================
--- trunk/giscanner/glibtransformer.py (original)
+++ trunk/giscanner/glibtransformer.py Mon Nov 17 22:07:26 2008
@@ -85,7 +85,7 @@
def __init__(self, transformer, noclosure=False):
self._transformer = transformer
self._transformer.set_container_types(['GList*', 'GSList*'],
- ['GHashtable*'])
+ ['GHashTable*'])
self._namespace_name = None
self._names = Names()
self._uscore_type_names = {}
Modified: trunk/tests/scanner/annotation-1.0-expected.gir
==============================================================================
--- trunk/tests/scanner/annotation-1.0-expected.gir (original)
+++ trunk/tests/scanner/annotation-1.0-expected.gir Mon Nov 17 22:07:26 2008
@@ -149,6 +149,14 @@
</type>
</return-value>
</method>
+ <method name="get_hash" c:identifier="annotation_object_get_hash">
+ <return-value transfer-ownership="full">
+ <type name="GLib.HashTable" c:type="GHashTable*">
+ <type name="utf8"/>
+ <type name="GObject.Object"/>
+ </type>
+ </return-value>
+ </method>
<method name="get_objects" c:identifier="annotation_object_get_objects">
<return-value transfer-ownership="container">
<type name="GLib.SList" c:type="GSList*">
Modified: trunk/tests/scanner/annotation-1.0-expected.tgir
==============================================================================
--- trunk/tests/scanner/annotation-1.0-expected.tgir (original)
+++ trunk/tests/scanner/annotation-1.0-expected.tgir Mon Nov 17 22:07:26 2008
@@ -140,6 +140,14 @@
</type>
</return-value>
</method>
+ <method name="get_hash" c:identifier="annotation_object_get_hash">
+ <return-value transfer-ownership="full">
+ <type name="GLib.HashTable">
+ <type name="utf8"/>
+ <type name="GObject.Object"/>
+ </type>
+ </return-value>
+ </method>
<method name="get_objects" c:identifier="annotation_object_get_objects">
<return-value transfer-ownership="container">
<type name="GLib.SList">
Modified: trunk/tests/scanner/annotation.c
==============================================================================
--- trunk/tests/scanner/annotation.c (original)
+++ trunk/tests/scanner/annotation.c Mon Nov 17 22:07:26 2008
@@ -161,6 +161,24 @@
return list;
}
+/**
+ * annotation_object_get_hash:
+ * @object: a #GObject
+ *
+ * This is a test for returning a hash table mapping strings to
+ * objects.
+ *
+ * Return value: (element-type utf8 GObject): hash table
+ */
+GHashTable*
+annotation_object_get_hash (AnnotationObject *object)
+{
+ GHashTable *hash = g_hash_table_new_full (g_str_hash, g_str_equal,
+ g_free, g_object_unref);
+ g_hash_table_insert (hash, g_strdup ("one"), g_object_ref (object));
+ g_hash_table_insert (hash, g_strdup ("two"), g_object_ref (object));
+ return hash;
+}
/**
* annotation_object_with_voidp
Modified: trunk/tests/scanner/annotation.h
==============================================================================
--- trunk/tests/scanner/annotation.h (original)
+++ trunk/tests/scanner/annotation.h Mon Nov 17 22:07:26 2008
@@ -55,6 +55,7 @@
GObject **toown1,
GObject **toown2);
GList* annotation_object_get_strings (AnnotationObject *object);
+GHashTable*annotation_object_get_hash (AnnotationObject *object);
GSList* annotation_object_get_objects (AnnotationObject *object);
void annotation_object_use_buffer (AnnotationObject *object,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]