]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Generate correct unref expressions for subtypes of special cases
authorEvan Nemerson <evan@coeus-group.com>
Sun, 24 Jun 2012 16:09:36 +0000 (18:09 +0200)
committerJürg Billeter <j@bitron.ch>
Sun, 24 Jun 2012 16:09:36 +0000 (18:09 +0200)
Fixes bug 617377.

codegen/valaccodebasemodule.vala

index fd7fe1782975b4f1a0dcc45d429794c56808a68f..3b80a9c55d9a84f792c3d1bb56d69d845c7a5219 100644 (file)
@@ -3181,10 +3181,10 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                if (context.profile == Profile.GOBJECT) {
                        if (type.data_type != null && !is_reference_counting (type.data_type) &&
-                           (type.data_type == gstringbuilder_type
-                            || type.data_type == garray_type
-                            || type.data_type == gbytearray_type
-                            || type.data_type == gptrarray_type)) {
+                           (type.data_type.is_subtype_of (gstringbuilder_type)
+                            || type.data_type.is_subtype_of (garray_type)
+                            || type.data_type.is_subtype_of (gbytearray_type)
+                            || type.data_type.is_subtype_of (gptrarray_type))) {
                                ccall.add_argument (new CCodeConstant ("TRUE"));
                        } else if (type.data_type == gthreadpool_type) {
                                ccall.add_argument (new CCodeConstant ("FALSE"));