From: Evan Nemerson Date: Sun, 24 Jun 2012 16:09:36 +0000 (+0200) Subject: Generate correct unref expressions for subtypes of special cases X-Git-Tag: 0.17.3~22 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=19dd72d1d0657993485b8dca566d541ca2012853;p=thirdparty%2Fvala.git Generate correct unref expressions for subtypes of special cases Fixes bug 617377. --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index fd7fe1782..3b80a9c55 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -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"));