[vala] glib-2.0: Support GVariant as fundamental type



commit c42f5c000c0142763c0d64bf4d9d285be94bc818
Author: Jürg Billeter <j bitron ch>
Date:   Sun Jun 20 14:28:57 2010 +0200

    glib-2.0: Support GVariant as fundamental type
    
    This requires GLib 2.25.10.

 codegen/valagtypemodule.vala |    3 +++
 vapi/glib-2.0.vapi           |    2 +-
 2 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index d1c0be0..87cffa9 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -1635,6 +1635,9 @@ public class Vala.GTypeModule : GErrorModule {
 			cspec.call = new CCodeIdentifier (param_spec_name);
 			if (param_spec_name == "g_param_spec_string") {
 				cspec.add_argument (new CCodeConstant ("NULL"));
+			} else if (param_spec_name == "g_param_spec_variant") {
+				cspec.add_argument (new CCodeConstant ("G_VARIANT_TYPE_ANY"));
+				cspec.add_argument (new CCodeConstant ("NULL"));
 			} else if (prop.property_type.data_type.get_type_id () != "G_TYPE_POINTER") {
 				cspec.add_argument (new CCodeIdentifier (prop.property_type.data_type.get_type_id ()));
 			}
diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi
index bb964cc..48ccff0 100644
--- a/vapi/glib-2.0.vapi
+++ b/vapi/glib-2.0.vapi
@@ -3903,7 +3903,7 @@ namespace GLib {
 	}
 
 	[Compact]
-	[CCode (ref_function = "g_variant_ref", unref_function = "g_variant_unref", ref_sink_function = "g_variant_ref_sink", type_id = "G_TYPE_VARIANT", type_signature = "v")]
+	[CCode (ref_function = "g_variant_ref", unref_function = "g_variant_unref", ref_sink_function = "g_variant_ref_sink", type_id = "G_TYPE_VARIANT", marshaller_type_name = "VARIANT", param_spec_function = "g_param_spec_variant", get_value_function = "g_value_get_variant", set_value_function = "g_value_set_variant", take_value_function = "g_value_take_variant", type_signature = "v")]
 	public class Variant {
 		public enum Class {
 			BOOLEAN, BYTE, INT16, UINT16, INT32, UINT32, INT64,



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