Skip to content

Commit

Permalink
Fix global var with init (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 authored Sep 6, 2023
1 parent d34ecec commit 3e23478
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/c2v.v
Original file line number Diff line number Diff line change
Expand Up @@ -1594,6 +1594,7 @@ unique name')
}

if is_inited {
c.genln('//!')
c.gen('[weak] __global ( ${name} ')
} else {
if typ.name.contains('anonymous enum') || typ.name.contains('unnamed enum') {
Expand Down

0 comments on commit 3e23478

Please sign in to comment.