v2: dont preifx C fns with module & add todo

pull/3779/head
joe-conigliaro 2020-02-19 18:08:08 +11:00
parent 83bfd0805e
commit 042bce4b6c
1 changed files with 7 additions and 1 deletions

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