From: Rico Tzschichholz Date: Thu, 14 Dec 2017 08:19:33 +0000 (+0100) Subject: girwriter: Use local reference to current CodeContext X-Git-Tag: 0.39.3~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=64568b612ed7b5bc823da721b010b9aa8d50da9a;p=thirdparty%2Fvala.git girwriter: Use local reference to current CodeContext --- diff --git a/codegen/valagirwriter.vala b/codegen/valagirwriter.vala index a115852e1..47e1d2a9d 100644 --- a/codegen/valagirwriter.vala +++ b/codegen/valagirwriter.vala @@ -835,7 +835,7 @@ public class Vala.GIRWriter : CodeVisitor { private void write_implicit_params (DataType type, ref int index, bool has_array_length, string name, ParameterDirection direction) { if (type is ArrayType && has_array_length) { - var int_type = new IntegerType (CodeContext.get ().root.scope.lookup ("int") as Struct); + var int_type = new IntegerType (context.root.scope.lookup ("int") as Struct); for (var i = 0; i < ((ArrayType) type).rank; i++) { write_param_or_return (int_type, true, ref index, has_array_length, "%s_length%i".printf (name, i + 1), null, direction); } @@ -845,7 +845,7 @@ public class Vala.GIRWriter : CodeVisitor { var data_type = new PointerType (new VoidType ()); write_param_or_return (data_type, true, ref index, false, "%s_target".printf (name), null, direction); if (deleg_type.is_disposable ()) { - var notify_type = new DelegateType (CodeContext.get ().root.scope.lookup ("GLib").scope.lookup ("DestroyNotify") as Delegate); + var notify_type = new DelegateType (context.root.scope.lookup ("GLib").scope.lookup ("DestroyNotify") as Delegate); write_param_or_return (notify_type, true, ref index, false, "%s_target_destroy_notify".printf (name), null, direction); } }