From f67e5d12e54397e41047d8e4c6157b0aba4cd7e5 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 15 Aug 2021 09:15:17 +0300 Subject: [PATCH] v.gen.c: fix v_typeof_interface_idx codegen (add `static `) --- vlib/v/gen/c/cgen.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/cgen.v b/vlib/v/gen/c/cgen.v index d5ade09750..64da1570be 100644 --- a/vlib/v/gen/c/cgen.v +++ b/vlib/v/gen/c/cgen.v @@ -587,7 +587,7 @@ pub fn (mut g Gen) write_typeof_functions() { g.writeln('\treturn "unknown ${util.strip_main_name(typ.name)}";') g.writeln('}') g.writeln('') - g.writeln('int v_typeof_interface_idx_${typ.cname}(int sidx) { /* $typ.name */ ') + g.writeln('static int v_typeof_interface_idx_${typ.cname}(int sidx) { /* $typ.name */ ') for t in inter_info.types { subtype := g.table.get_type_symbol(t) g.writeln('\tif (sidx == _${typ.cname}_${subtype.cname}_index) return ${int(t)};')