]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Use G_TYPE_ERROR instead of G_TYPE_POINTER for GLib >= 2.26
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 23 Apr 2010 04:38:23 +0000 (06:38 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 27 Apr 2010 11:38:06 +0000 (13:38 +0200)
Fixes bug 616588.

vala/valaerrortype.vala

index a21a323a3fa06ab34f30ecbb60f9967f3a999cfe..f0e9ab219e6e45b5d2ab321fa3d2a99cab93d61d 100644 (file)
@@ -136,7 +136,11 @@ public class Vala.ErrorType : ReferenceType {
        }
 
        public override string? get_type_id () {
-               return "G_TYPE_POINTER";
+               if (source_reference != null && source_reference.file.context.require_glib_version (2, 26)) {
+                       return "G_TYPE_ERROR";
+               } else {
+                       return "G_TYPE_POINTER";
+               }
        }
 
        public override bool is_reference_type_or_type_parameter () {