Skip to content

Commit

Permalink
fix redefinition of '_v_type_idx_voidptr'
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Oct 10, 2023
1 parent c59ba07 commit e5d590f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,14 @@ pub fn gen(files []&ast.File, table &ast.Table, pref_ &pref.Preferences) (string
// to make sure type idx's are the same in cached mods
if g.pref.build_mode == .build_module {
for idx, sym in g.table.type_symbols {
if idx in [0, 30] {
if idx in [0, 31] {
continue
}
g.definitions.writeln('int _v_type_idx_${sym.cname}();')
}
} else if g.pref.use_cache {
for idx, sym in g.table.type_symbols {
if idx in [0, 30] {
if idx in [0, 31] {
continue
}
g.definitions.writeln('int _v_type_idx_${sym.cname}() { return ${idx}; };')
Expand Down

0 comments on commit e5d590f

Please sign in to comment.