[vala/0.52] codegen: Mark entry point method implementation "_vala_main" as static



commit b4ec0d679a51d7537cc6d27be456bdae16f37049
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Sun May 9 21:28:25 2021 +0200

    codegen: Mark entry point method implementation "_vala_main" as static
    
    Thanks to Al Thomas

 codegen/valaccodemethodmodule.vala | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala
index 944d6a00a..dafc66191 100644
--- a/codegen/valaccodemethodmodule.vala
+++ b/codegen/valaccodemethodmodule.vala
@@ -173,6 +173,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");
@@ -419,6 +423,10 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                        function.modifiers |= CCodeModifiers.INLINE;
                }
 
+               if (m.entry_point) {
+                       function.modifiers |= CCodeModifiers.STATIC;
+               }
+
                var cparam_map = new HashMap<int,CCodeParameter> (direct_hash, direct_equal);
 
                generate_cparameters (m, cfile, cparam_map, function);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]