Skip to content

Commit 062b9df

Browse files
authored
cgen: fix calling builtin__closure__closure_init() before vinit() with -shared (fix #25417) (#25433)
1 parent a8c6974 commit 062b9df

2 files changed

Lines changed: 1 addition & 4 deletions

File tree

‎vlib/v/gen/c/cgen.v‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6798,9 +6798,6 @@ fn (mut g Gen) write_init_function() {
67986798
g.export_funcs << '_vinit_caller'
67996799
g.writeln('void _vinit_caller() {')
68006800
g.writeln('\tstatic bool once = false; if (once) {return;} once = true;')
6801-
if g.nr_closures > 0 {
6802-
g.writeln('\tbuiltin__closure__closure_init(); // vinit_caller()')
6803-
}
68046801
g.writeln('\t_vinit(0,0);')
68056802
g.writeln('}')
68066803

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__closure_init(); // vinit_caller()
1+
builtin__closure__closure_init();

0 commit comments

Comments
 (0)