]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Do not create a shadowing *_private_offset variable in GtkModule
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 9 Jul 2018 10:53:01 +0000 (12:53 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 9 Jul 2018 10:57:06 +0000 (12:57 +0200)
This is globally available since df56f916e52e5efe3876afed59a6190f6cead1c8

codegen/valagtkmodule.vala

index bd54f9cd70abdff1c4a6fe86242a29b5a88d526b..da0fe9905bde805700d9cdfadc04ac55d73fb63e 100644 (file)
@@ -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) {