diff --git a/vlib/v/gen/cgen.v b/vlib/v/gen/cgen.v index ae5084989c..778f966aed 100644 --- a/vlib/v/gen/cgen.v +++ b/vlib/v/gen/cgen.v @@ -879,7 +879,7 @@ fn (mut g Gen) stmt(node ast.Stmt) { } ast.GlobalDecl { styp := g.typ(node.typ) - g.definitions.writeln('static $styp $node.name; // global') + g.definitions.writeln('$styp $node.name; // global') } ast.GoStmt { g.go_stmt(node) @@ -3201,7 +3201,7 @@ fn (mut g Gen) const_decl(node ast.ConstDecl) { } } ast.StringLiteral { - g.definitions.writeln('static string _const_$name; // a string literal, inited later') + g.definitions.writeln('string _const_$name; // a string literal, inited later') if g.pref.build_mode != .build_module { g.stringliterals.writeln('\t_const_$name = $val;') } @@ -3228,7 +3228,7 @@ fn (mut g Gen) const_decl_init_later(mod, name, val string, typ table.Type) { styp := g.typ(typ) // cname := '_const_$name' - g.definitions.writeln('static $styp $cname; // inited later') + g.definitions.writeln('$styp $cname; // inited later') g.inits[mod].writeln('\t$cname = $val;') if g.pref.autofree { if styp.starts_with('array_') { diff --git a/vlib/v/gen/cheaders.v b/vlib/v/gen/cheaders.v index be88c8b0b7..2fc0735947 100644 --- a/vlib/v/gen/cheaders.v +++ b/vlib/v/gen/cheaders.v @@ -225,7 +225,7 @@ $c_common_macros #endif // g_live_info is used by live.info() -static void* g_live_info = NULL; +void* g_live_info = NULL; //============================== HELPER C MACROS =============================*/ //#define tos4(s, slen) ((string){.str=(s), .len=(slen)}) @@ -265,7 +265,7 @@ static inline bool _us64_lt(uint64_t a, int64_t b) { return a < INT64_MAX && (in //================================== GLOBALS =================================*/ //byte g_str_buf[1024]; -static byte* g_str_buf; +byte* g_str_buf; int load_so(byteptr); void reload_so(); void _vinit();