From: Rico Tzschichholz Date: Sat, 25 Feb 2017 12:07:11 +0000 (+0100) Subject: codegen: Pass pointer of matching type to property-getter X-Git-Tag: 0.35.6~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8036f870f57603b8572718d1a0ec147ed18deab7;p=thirdparty%2Fvala.git codegen: Pass pointer of matching type to property-getter https://bugzilla.gnome.org/show_bug.cgi?id=777958 --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index 880e8a2d0..951289562 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -1782,7 +1782,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { if (get_accessor != null) { var property_type = prop.property_type; var get_call = new CCodeFunctionCall (new CCodeIdentifier (get_ccode_real_name (get_accessor))); - get_call.add_argument (new CCodeIdentifier ("self")); + get_call.add_argument (new CCodeIdentifier (is_virtual ? "base" : "self")); if (property_type is ArrayType) { ccode.add_declaration ("int", new CCodeVariableDeclarator ("old_value_length"));