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

ci: fix VLS compilation after 36dc7fa

This commit is contained in:
Delyan Angelov 2023-02-08 14:04:03 +02:00
parent 6b0b7a9e4f
commit c16549b6fd
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -435,7 +435,9 @@ 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 && node.receiver.typ.is_real_pointer() {
if unwrapped_rec_sym.language == .c && node.receiver.typ.is_real_pointer()
&& node.name == 'str' {
// TODO: handle this in a more general way, perhaps add a `[typedef_incomplete]` attribute, for C structs instead of this hack
name = name.replace_once('C__', '')
}
}