From: Marc-André Lureau Date: Fri, 9 Apr 2010 19:42:17 +0000 (+0200) Subject: GRegex is available only in the GObject profile X-Git-Tag: 0.9.1~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a722c9be20cdbb61adafbe61c5f2c7653675bd8d;p=thirdparty%2Fvala.git GRegex is available only in the GObject profile Fixes bug 615321. --- diff --git a/codegen/valaccodebasemodule.vala b/codegen/valaccodebasemodule.vala index f5c8381b7..b0ba61ad3 100644 --- a/codegen/valaccodebasemodule.vala +++ b/codegen/valaccodebasemodule.vala @@ -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) { diff --git a/vala/valasemanticanalyzer.vala b/vala/valasemanticanalyzer.vala index 54e6ced91..5f1625dae 100644 --- a/vala/valasemanticanalyzer.vala +++ b/vala/valasemanticanalyzer.vala @@ -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");