vala r806 - in trunk: . vapi vapi/packages/gstreamer-0.10 vapigen



Author: juergbi
Date: Mon Jan  7 22:11:39 2008
New Revision: 806
URL: http://svn.gnome.org/viewvc/vala?rev=806&view=rev

Log:
2008-01-07  Juerg Billeter  <j bitron ch>

	* vapigen/valagidlparser.vala: support throws attribute in metadata

	* vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata: fix error
	  parameters in gst_message_* functions

	* vapi/gstreamer-0.10.vapi: regenerated

	Patch by Andrea Del Signore, fixes bug 507460


Modified:
   trunk/ChangeLog
   trunk/vapi/gstreamer-0.10.vapi
   trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
   trunk/vapigen/valagidlparser.vala

Modified: trunk/vapi/gstreamer-0.10.vapi
==============================================================================
--- trunk/vapi/gstreamer-0.10.vapi	(original)
+++ trunk/vapi/gstreamer-0.10.vapi	Mon Jan  7 22:11:39 2008
@@ -717,8 +717,8 @@
 		public Message.duration (Gst.Object src, Gst.Format format, int64 duration);
 		public Message.element (Gst.Object src, Gst.Structure structure);
 		public Message.eos (Gst.Object src);
-		public Message.error (Gst.Object src, string debug) throws GLib.Error;
-		public Message.info (Gst.Object src, string debug) throws GLib.Error;
+		public Message.error (Gst.Object src, GLib.Error error, string debug);
+		public Message.info (Gst.Object src, GLib.Error error, string debug);
 		public Message.latency (Gst.Object src);
 		public Message.new_clock (Gst.Object src, Gst.Clock clock);
 		public Message.segment_done (Gst.Object src, Gst.Format format, int64 position);
@@ -726,20 +726,20 @@
 		public Message.state_changed (Gst.Object src, Gst.State oldstate, Gst.State newstate, Gst.State pending);
 		public Message.state_dirty (Gst.Object src);
 		public Message.tag (Gst.Object src, Gst.TagList tag_list);
-		public Message.warning (Gst.Object src, string debug) throws GLib.Error;
+		public Message.warning (Gst.Object src, GLib.Error error, string debug);
 		public void parse_async_start (bool new_base_time);
 		public void parse_buffering (int percent);
 		public void parse_clock_lost (out weak Gst.Clock clock);
 		public void parse_clock_provide (out weak Gst.Clock clock, bool ready);
 		public void parse_duration (Gst.Format format, int64 duration);
-		public void parse_error (string debug) throws GLib.Error;
-		public void parse_info (string debug) throws GLib.Error;
+		public void parse_error (out weak GLib.Error gerror, out weak string debug);
+		public void parse_info (out weak GLib.Error gerror, out weak string debug);
 		public void parse_new_clock (out weak Gst.Clock clock);
 		public void parse_segment_done (Gst.Format format, int64 position);
 		public void parse_segment_start (Gst.Format format, int64 position);
 		public void parse_state_changed (Gst.State oldstate, Gst.State newstate, Gst.State pending);
 		public void parse_tag (out weak Gst.TagList tag_list);
-		public void parse_warning (string debug) throws GLib.Error;
+		public void parse_warning (out weak GLib.Error gerror, out weak string debug);
 		public static weak string type_get_name (Gst.MessageType type);
 		public static GLib.Quark type_to_quark (Gst.MessageType type);
 	}
@@ -1549,7 +1549,7 @@
 		public uint flags;
 		public static bool check_uniqueness (GLib.List list, string name);
 		public static void default_deep_notify (GLib.Object object, Gst.Object orig, GLib.ParamSpec pspec, string excluded_props);
-		public void default_error (string debug) throws GLib.Error;
+		public void default_error (GLib.Error error, string debug);
 		public weak string get_name ();
 		public weak string get_name_prefix ();
 		public weak Gst.Object get_parent ();

Modified: trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata
==============================================================================
--- trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata	(original)
+++ trunk/vapi/packages/gstreamer-0.10/gstreamer-0.10.metadata	Mon Jan  7 22:11:39 2008
@@ -28,4 +28,16 @@
 gst_type_register_static_full hidden="1"
 GstURIHandler::new_uri has_emitter="1"
 gst_version_string transfer_ownership="1"
-
+gst_message_new_error throws="0"
+gst_message_new_info throws="0"
+gst_message_new_warning throws="0"
+gst_message_parse_error throws="0"
+gst_message_parse_error.gerror is_out="1"
+gst_message_parse_error.debug is_out="1"
+gst_message_parse_info throws="0"
+gst_message_parse_info.gerror is_out="1"
+gst_message_parse_info.debug is_out="1"
+gst_message_parse_warning throws="0"
+gst_message_parse_warning.gerror is_out="1"
+gst_message_parse_warning.debug is_out="1"
+gst_object_default_error throws="0"

Modified: trunk/vapigen/valagidlparser.vala
==============================================================================
--- trunk/vapigen/valagidlparser.vala	(original)
+++ trunk/vapigen/valagidlparser.vala	Mon Jan  7 22:11:39 2008
@@ -1167,6 +1167,7 @@
 		}
 		
 		bool add_ellipsis = false;
+		bool suppress_throws = false;
 
 		var attributes = get_attributes (f.symbol);
 		if (attributes != null) {
@@ -1194,6 +1195,10 @@
 						return_type.array_rank = 1;
 						return_type.is_out = false;
 					}
+				} else if (nv[0] == "throws") {
+					if (eval (nv[1]) == "0") {
+						suppress_throws = true;
+					}
 				}
 			}
 		}
@@ -1221,7 +1226,7 @@
 				}
 			}
 
-			if (param.type.is_error) {
+			if (suppress_throws == false && param.type.is_error) {
 				m.add_error_domain (parse_type (param.type));
 				continue;
 			}



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