1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

cgen: fix compilation of vlang/sdl examples

This commit is contained in:
Delyan Angelov 2023-02-08 13:27:59 +02:00
parent 36dc7faf2c
commit 6b0b7a9e4f
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -435,7 +435,7 @@ fn (mut g Gen) c_fn_name(node &ast.FnDecl) !string {
return error('none') return error('none')
} }
name = g.cc_type(node.receiver.typ, false) + '_' + name 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__', '') name = name.replace_once('C__', '')
} }
} }