vala r2445 - in trunk: . vala



Author: ryanl
Date: Mon Feb 16 16:49:21 2009
New Revision: 2445
URL: http://svn.gnome.org/viewvc/vala?rev=2445&view=rev

Log:
2009-02-16  Ryan Lortie  <desrt desrt ca>

        * vala/valaclass.vala: only use g_value_set_pointer if the GType of a
        class is G_TYPE_POINTER; else use g_value_set_boxed.



Modified:
   trunk/ChangeLog
   trunk/vala/valaclass.vala

Modified: trunk/vala/valaclass.vala
==============================================================================
--- trunk/vala/valaclass.vala	(original)
+++ trunk/vala/valaclass.vala	Mon Feb 16 16:49:21 2009
@@ -718,8 +718,10 @@
 				get_value_function = get_lower_case_cname ("value_get_");
 			} else if (base_class != null) {
 				get_value_function = base_class.get_get_value_function ();
-			} else {
+			} else if (get_type_id () == "G_TYPE_POINTER") {
 				get_value_function = "g_value_get_pointer";
+			} else {
+				get_value_function = "g_value_get_boxed";
 			}
 		}
 
@@ -732,8 +734,10 @@
 				set_value_function = get_lower_case_cname ("value_set_");
 			} else if (base_class != null) {
 				set_value_function = base_class.get_set_value_function ();
-			} else {
+			} else if (get_type_id () == "G_TYPE_POINTER") {
 				set_value_function = "g_value_set_pointer";
+			} else {
+				set_value_function = "g_value_set_boxed";
 			}
 		}
 
@@ -1112,3 +1116,4 @@
 	}
 }
 
+// vim:sw=8 noet



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