]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Fix regex literal compile flags
authorAli Sabil <ali.sabil@gmail.com>
Thu, 1 Nov 2018 13:06:52 +0000 (14:06 +0100)
committerRico Tzschichholz <ricotz@ubuntu.com>
Thu, 1 Nov 2018 13:38:29 +0000 (14:38 +0100)
The GRegex GRegexCompileFlags were declared as GRegexMatchFlags, leading
to a C compiler warning.

codegen/valaccodebasemodule.vala

index 45fb7975f487f14a37a6ff073909352f03c986fb..aa7d91cab31fafb5415163d86b624f4b6f6e6839 100644 (file)
@@ -4077,7 +4077,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
                        fun.modifiers = CCodeModifiers.STATIC | CCodeModifiers.INLINE;
                        fun.add_parameter (new CCodeParameter ("re", "GRegex**"));
                        fun.add_parameter (new CCodeParameter ("pattern", "const gchar *"));
-                       fun.add_parameter (new CCodeParameter ("match_options", "GRegexMatchFlags"));
+                       fun.add_parameter (new CCodeParameter ("compile_flags", "GRegexCompileFlags"));
 
                        push_function (fun);
 
@@ -4087,7 +4087,7 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
 
                        var regex_new_call = new CCodeFunctionCall (new CCodeIdentifier ("g_regex_new"));
                        regex_new_call.add_argument (new CCodeConstant ("pattern"));
-                       regex_new_call.add_argument (new CCodeConstant ("match_options"));
+                       regex_new_call.add_argument (new CCodeConstant ("compile_flags"));
                        regex_new_call.add_argument (new CCodeConstant ("0"));
                        regex_new_call.add_argument (new CCodeConstant ("NULL"));
                        ccode.add_assignment (new CCodeIdentifier ("GRegex* val"), regex_new_call);