]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GRegex is available only in the GObject profile
authorMarc-André Lureau <marcandre.lureau@gmail.com>
Fri, 9 Apr 2010 19:42:17 +0000 (21:42 +0200)
committerJürg Billeter <j@bitron.ch>
Tue, 27 Apr 2010 09:12:24 +0000 (11:12 +0200)
Fixes bug 615321.

codegen/valaccodebasemodule.vala
vala/valasemanticanalyzer.vala

index f5c8381b719777fb81452c5a46ea42d171e42614..b0ba61ad31ceba4d1410513d2e713de8648a440d 100644 (file)
@@ -315,8 +315,6 @@ public class Vala.CCodeBaseModule : CCodeModule {
                float_type = new FloatingType ((Struct) root_symbol.scope.lookup ("float"));
                double_type = new FloatingType ((Struct) root_symbol.scope.lookup ("double"));
                string_type = new ObjectType ((Class) root_symbol.scope.lookup ("string"));
-               regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex"));
-
                var unichar_struct = (Struct) root_symbol.scope.lookup ("unichar");
                if (unichar_struct != null) {
                        unichar_type = new IntegerType (unichar_struct);
@@ -344,6 +342,8 @@ public class Vala.CCodeBaseModule : CCodeModule {
 
                        type_module_type = (TypeSymbol) glib_ns.scope.lookup ("TypeModule");
 
+                       regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex"));
+
                        if (context.module_init_method != null) {
                                foreach (FormalParameter parameter in context.module_init_method.get_parameters ()) {
                                        if (parameter.parameter_type.data_type == type_module_type) {
index 54e6ced911b72cfcbbf71d582b3cfca5bdca2cd8..5f1625dae564463208466d8cb5d3772c319c1524 100644 (file)
@@ -177,8 +177,6 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
 
                bool_type = new BooleanType ((Struct) root_symbol.scope.lookup ("bool"));
                string_type = new ObjectType ((Class) root_symbol.scope.lookup ("string"));
-               regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex"));
-
                short_type = new IntegerType ((Struct) root_symbol.scope.lookup ("short"));
                ushort_type = new IntegerType ((Struct) root_symbol.scope.lookup ("ushort"));
                int_type = new IntegerType ((Struct) root_symbol.scope.lookup ("int"));
@@ -218,6 +216,7 @@ public class Vala.SemanticAnalyzer : CodeVisitor {
                        gvaluearray_type = new ObjectType ((Class) glib_ns.scope.lookup ("ValueArray"));
 
                        gerror_type = (Class) glib_ns.scope.lookup ("Error");
+                       regex_type = new ObjectType ((Class) root_symbol.scope.lookup ("GLib").scope.lookup ("Regex"));
                } else if (context.profile == Profile.DOVA) {
                        var dova_ns = root_symbol.scope.lookup ("Dova");