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

v2: dont preifx C fns with module & add todo

This commit is contained in:
joe-conigliaro 2020-02-19 18:08:08 +11:00
parent 83bfd0805e
commit 042bce4b6c

View File

@ -151,8 +151,14 @@ fn (p mut Parser) fn_decl() ast.FnDecl {
}
}
else {
// TODO: prefix c fuctions with C.
// since v1 does not currently it sees
// `fn C.free` and `fn free` as the same
if !is_c {
name = p.prepend_mod(name)
}
p.table.register_fn(table.Fn{
name: p.prepend_mod(name)
name: name
args: args
return_type: typ
is_variadic: is_variadic