vala r1953 - in trunk: . vala vapi
- From: juergbi svn gnome org
- To: svn-commits-list gnome org
- Subject: vala r1953 - in trunk: . vala vapi
- Date: Sun, 2 Nov 2008 16:57:30 +0000 (UTC)
Author: juergbi
Date: Sun Nov 2 16:57:30 2008
New Revision: 1953
URL: http://svn.gnome.org/viewvc/vala?rev=1953&view=rev
Log:
2008-11-02 JÃrg Billeter <j bitron ch>
* vala/valadatatype.vala:
* vapi/glib-2.0.vapi:
Return the right D-Bus type signature for GHashTable,
patch by Marc-Andrà Lureau
Modified:
trunk/ChangeLog
trunk/vala/valadatatype.vala
trunk/vapi/glib-2.0.vapi
Modified: trunk/vala/valadatatype.vala
==============================================================================
--- trunk/vala/valadatatype.vala (original)
+++ trunk/vala/valadatatype.vala Sun Nov 2 16:57:30 2008
@@ -443,7 +443,24 @@
*/
public virtual string? get_type_signature () {
if (data_type != null) {
- return data_type.get_type_signature ();
+ string sig = data_type.get_type_signature ();
+
+ var type_args = get_type_arguments ();
+ if (type_args.size > 0) {
+ assert (sig.str ("%s") != null);
+
+ string element_sig = "";
+ foreach (DataType type_arg in type_args) {
+ var s = type_arg.get_type_signature ();
+ if (s != null) {
+ element_sig += s;
+ }
+ }
+
+ sig = sig.printf (element_sig);
+ }
+
+ return sig;
} else {
return null;
}
Modified: trunk/vapi/glib-2.0.vapi
==============================================================================
--- trunk/vapi/glib-2.0.vapi (original)
+++ trunk/vapi/glib-2.0.vapi Sun Nov 2 16:57:30 2008
@@ -2851,7 +2851,7 @@
/* Hash Tables */
[Compact]
- [CCode (ref_function = "g_hash_table_ref", unref_function = "g_hash_table_unref")]
+ [CCode (ref_function = "g_hash_table_ref", unref_function = "g_hash_table_unref", type_signature = "a{%s}")]
public class HashTable<K,V> : Boxed {
public HashTable (HashFunc hash_func, EqualFunc key_equal_func);
public HashTable.full (HashFunc hash_func, EqualFunc key_equal_func, DestroyNotify? key_destroy_func, DestroyNotify? value_destroy_func);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]