[vala] Fix implicit casts involving Gst.Value



commit 2548214f4943d16b24c00b2f0528a30c92494191
Author: Jürg Billeter <j bitron ch>
Date:   Sun Jun 14 17:09:45 2009 +0200

    Fix implicit casts involving Gst.Value
    
    Based on patch by Víctor Manuel Jáquez Leal, fixes bug 585018.

 codegen/valaccodebasemodule.vala                   |    2 +-
 vapi/gstreamer-0.10.vapi                           |    2 +-
 .../gstreamer-0.10/gstreamer-0.10-custom.vala      |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala
index d52a639..4b0387d 100644
--- a/codegen/valaccodebasemodule.vala
+++ b/codegen/valaccodebasemodule.vala
@@ -3612,7 +3612,7 @@ internal class Vala.CCodeBaseModule : CCodeModule {
 
 		bool gvalue_boxing = (target_type != null
 		                      && target_type.data_type == gvalue_type
-		                      && expression_type.data_type != gvalue_type);
+		                      && expression_type.get_type_id () != "G_TYPE_VALUE");
 
 		if (expression_type.value_owned
 		    && (target_type == null || !target_type.value_owned || boxing || unboxing || gvalue_boxing)) {
diff --git a/vapi/gstreamer-0.10.vapi b/vapi/gstreamer-0.10.vapi
index 4fb2210..a9a0a4f 100644
--- a/vapi/gstreamer-0.10.vapi
+++ b/vapi/gstreamer-0.10.vapi
@@ -1390,7 +1390,7 @@ namespace Gst {
 		public Gst.PadTemplate get ();
 		public Gst.Caps get_caps ();
 	}
-	[CCode (cname = "GValue", type_id = "GST_TYPE_VALUE", cheader_filename = "gst/gst.h")]
+	[CCode (cname = "GValue", type_id = "G_TYPE_VALUE", cheader_filename = "gst/gst.h")]
 	public struct Value : GLib.Value {
 		public void array_append_value (Gst.Value append_value);
 		public uint array_get_size ();
diff --git a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
index 48e3180..b282472 100644
--- a/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
+++ b/vapi/packages/gstreamer-0.10/gstreamer-0.10-custom.vala
@@ -153,7 +153,7 @@ namespace Gst {
 	public struct Fraction {}
 	public struct FractionRange {}
 
-	[CCode (cname = "GValue")]
+	[CCode (cname = "GValue", type_id = "G_TYPE_VALUE")]
 	public struct Value : GLib.Value {
 
 		public static GLib.Type array_get_type ();



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