[vala] codegen: Do not create a shadowing *_private_offset variable in GtkModule
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] codegen: Do not create a shadowing *_private_offset variable in GtkModule
- Date: Mon, 9 Jul 2018 11:03:08 +0000 (UTC)
commit 70e09f78cb347c6b188a1100ec39748e337d53c1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Mon Jul 9 12:53:01 2018 +0200
codegen: Do not create a shadowing *_private_offset variable in GtkModule
This is globally available since df56f916e52e5efe3876afed59a6190f6cead1c8
codegen/valagtkmodule.vala | 10 ----------
1 file changed, 10 deletions(-)
---
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]