]> 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>
Mon, 5 Nov 2018 07:47:54 +0000 (08:47 +0100)
The GRegex GRegexCompileFlags were declared as GRegexMatchFlags, leading
to a C compiler warning.

codegen/valaccodebasemodule.vala

index e37042044c9b9d6d066781cde4035c4a979e31db..adafcaa4e71771a9e9a8a8cbd2dcc3153e6099f7 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);