From 6b0b7a9e4fbfb81b68a38aaa4de93ab4a3c290e6 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 8 Feb 2023 13:27:59 +0200 Subject: [PATCH] cgen: fix compilation of vlang/sdl examples --- vlib/v/gen/c/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/gen/c/fn.v b/vlib/v/gen/c/fn.v index ae888d3306..39725a3e4f 100644 --- a/vlib/v/gen/c/fn.v +++ b/vlib/v/gen/c/fn.v @@ -435,7 +435,7 @@ fn (mut g Gen) c_fn_name(node &ast.FnDecl) !string { return error('none') } name = g.cc_type(node.receiver.typ, false) + '_' + name - if unwrapped_rec_sym.language == .c { + if unwrapped_rec_sym.language == .c && node.receiver.typ.is_real_pointer() { name = name.replace_once('C__', '') } }