From: Rico Tzschichholz Date: Sun, 9 May 2021 19:28:25 +0000 (+0200) Subject: codegen: Mark entry point method implementation "_vala_main" as static X-Git-Tag: 0.50.9~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99843890aee9f8e1b8c038ca064f167781a17fab;p=thirdparty%2Fvala.git codegen: Mark entry point method implementation "_vala_main" as static Thanks to Al Thomas --- diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala index 3dbc02b52..1a197e11a 100644 --- a/codegen/valaccodemethodmodule.vala +++ b/codegen/valaccodemethodmodule.vala @@ -177,6 +177,10 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule { function.modifiers |= CCodeModifiers.INTERNAL; } + if (m.entry_point) { + function.modifiers |= CCodeModifiers.STATIC; + } + if (m.version.deprecated) { if (context.profile == Profile.GOBJECT) { decl_space.add_include ("glib.h"); @@ -423,6 +427,10 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule { function.modifiers |= CCodeModifiers.INLINE; } + if (m.entry_point) { + function.modifiers |= CCodeModifiers.STATIC; + } + var cparam_map = new HashMap (direct_hash, direct_equal); generate_cparameters (m, cfile, cparam_map, function);