diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-04-08 15:50:53 +0200 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2023-04-08 15:50:53 +0200 |
commit | 84b531ab37e271895f751279c1bbc51b6f2ac393 (patch) | |
tree | a207032adde269b8070180974fd51b54b15d65be | |
parent | e8a81d9a49ef569b632107a07e605aaa4705d347 (diff) | |
download | vala-84b531ab37e271895f751279c1bbc51b6f2ac393.tar.gz |
Use already available glib_ns instead of root_symbol.scope.lookup ("GLib")
-rw-r--r-- | codegen/valaccodebasemodule.vala | 4 | ||||
-rw-r--r-- | 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"); |