]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Use already available glib_ns instead of root_symbol.scope.lookup ("GLib")
authorRico Tzschichholz <ricotz@ubuntu.com>
Sat, 8 Apr 2023 13:50:53 +0000 (15:50 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Sat, 8 Apr 2023 13:50:53 +0000 (15:50 +0200)
codegen/valaccodebasemodule.vala
vala/valasemanticanalyzer.vala

index bf699a076c9d7d3b3f0acaa09ba1a97a8b79647b..51d40271295cf24cb8e60e678c1cf288d70f3661 100644 (file)
@@ -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 ()) {
index 98f8e1cf5b4790f31b8e7281bd6ede155c179f93..a5076a2fef72c09f24617893a703a340b8d17947 100644 (file)
@@ -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");