From: Rico Tzschichholz Date: Mon, 9 Jul 2018 10:53:01 +0000 (+0200) Subject: codegen: Do not create a shadowing *_private_offset variable in GtkModule X-Git-Tag: 0.41.90~28 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=70e09f78cb347c6b188a1100ec39748e337d53c1;p=thirdparty%2Fvala.git codegen: Do not create a shadowing *_private_offset variable in GtkModule This is globally available since df56f916e52e5efe3876afed59a6190f6cead1c8 --- diff --git a/codegen/valagtkmodule.vala b/codegen/valagtkmodule.vala index bd54f9cd7..da0fe9905 100644 --- a/codegen/valagtkmodule.vala +++ b/codegen/valagtkmodule.vala @@ -230,16 +230,6 @@ public class Vala.GtkModule : GSignalModule { return; } - // this check is necessary because calling get_instance_private_offset otherwise will result in an error - if (cl.has_private_fields) { - var private_offset = "%s_private_offset".printf (get_ccode_name (cl)); - ccode.add_declaration ("gint", new CCodeVariableDeclarator (private_offset)); - - var cgetprivcall = new CCodeFunctionCall (new CCodeIdentifier ("g_type_class_get_instance_private_offset")); - cgetprivcall.add_argument (new CCodeIdentifier ("klass")); - ccode.add_assignment (new CCodeIdentifier (private_offset), cgetprivcall); - } - /* Gtk builder widget template */ var ui = cl.get_attribute_string ("GtkTemplate", "ui"); if (ui == null) {