vala r2150 - in trunk: . gobject vapi



Author: juergbi
Date: Sun Dec 14 23:47:17 2008
New Revision: 2150
URL: http://svn.gnome.org/viewvc/vala?rev=2150&view=rev

Log:
2008-12-15  JÃrg Billeter  <j bitron ch>

	* gobject/valaccodebasemodule.vala:
	* vapi/glib-2.0.vapi:

	Support empty ref_function and unref_function attributes,
	fix GSequenceIter binding


Modified:
   trunk/ChangeLog
   trunk/gobject/valaccodebasemodule.vala
   trunk/vapi/glib-2.0.vapi

Modified: trunk/gobject/valaccodebasemodule.vala
==============================================================================
--- trunk/gobject/valaccodebasemodule.vala	(original)
+++ trunk/gobject/valaccodebasemodule.vala	Sun Dec 14 23:47:17 2008
@@ -2306,6 +2306,13 @@
 			return false;
 		}
 
+		var cl = type.data_type as Class;
+		if (cl != null && cl.is_reference_counting ()
+		    && cl.get_ref_function () == "") {
+			// empty ref_function => no ref necessary
+			return false;
+		}
+
 		if (type.type_parameter != null) {
 			if (!(current_type_symbol is Class) || current_class.is_compact) {
 				return false;
@@ -2320,6 +2327,13 @@
 			return false;
 		}
 
+		var cl = type.data_type as Class;
+		if (cl != null && cl.is_reference_counting ()
+		    && cl.get_unref_function () == "") {
+			// empty unref_function => no unref necessary
+			return false;
+		}
+
 		if (type.type_parameter != null) {
 			if (!(current_type_symbol is Class) || current_class.is_compact) {
 				return false;

Modified: trunk/vapi/glib-2.0.vapi
==============================================================================
--- trunk/vapi/glib-2.0.vapi	(original)
+++ trunk/vapi/glib-2.0.vapi	Sun Dec 14 23:47:17 2008
@@ -2862,9 +2862,9 @@
 		public static SequenceIter<G> range_get_midpoint (SequenceIter<G> begin, SequenceIter<G> end);
 	}
 
-	[SimpleType]
-	[CCode (cname = "GSequenceIter*", type_id = "G_TYPE_POINTER")]
-	public struct SequenceIter<G> {
+	[Compact]
+	[CCode (ref_function = "", unref_function = "")]
+	public class SequenceIter<G> {
 		public bool is_begin ();
 		public bool is_end ();
 		public SequenceIter<G> next ();



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