From 84b531ab37e271895f751279c1bbc51b6f2ac393 Mon Sep 17 00:00:00 2001 From: Rico Tzschichholz Date: Sat, 8 Apr 2023 15:50:53 +0200 Subject: Use already available glib_ns instead of root_symbol.scope.lookup ("GLib") --- codegen/valaccodebasemodule.vala | 4 ++-- vala/valasemanticanalyzer.vala | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index bf699a076..51d402712 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -529,7 +529,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { gsequence_iter_type = (Class) glib_ns.scope.lookup ("SequenceIter"); gthreadpool_type = (TypeSymbol) glib_ns.scope.lookup ("ThreadPool"); - gerror = (Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Error"); + gerror = (Class) glib_ns.scope.lookup ("Error"); gquark_type = new IntegerType ((Struct) glib_ns.scope.lookup ("Quark")); gvalue_type = (Struct) glib_ns.scope.lookup ("Value"); gvariant_type = (Class) glib_ns.scope.lookup ("Variant"); @@ -544,7 +544,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator { type_module_type = (TypeSymbol) glib_ns.scope.lookup ("TypeModule"); - regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex")); + regex_type = new ObjectType ((Class) glib_ns.scope.lookup ("Regex")); if (context.module_init_method != null) { foreach (Parameter parameter in context.module_init_method.get_parameters ()) { diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index 98f8e1cf5..a5076a2fe 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -234,7 +234,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor { gsequence_type = new ObjectType ((Class) glib_ns.scope.lookup ("Sequence")); gerror_type = (Class) glib_ns.scope.lookup ("Error"); - regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex")); + regex_type = new ObjectType ((Class) glib_ns.scope.lookup ("Regex")); gsource_type = (Class) glib_ns.scope.lookup ("Source"); -- cgit v1.2.1