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

compiler: first step to require explicit definition of imported C fns

This commit is contained in:
Alexander Medvednikov
2019-09-19 05:16:25 +03:00
parent 13e4c79f58
commit cb31eeec55
4 changed files with 13 additions and 2 deletions

View File

@ -1582,6 +1582,10 @@ fn (p mut Parser) name_expr() string {
cfn := p.table.find_fn(name) or {
// Not Found? Return 'void*'
//return 'cvoid' //'void*'
if false {
p.warn('\ndefine imported C function with ' +
'`fn C.$name([args]) [return_type]`\n')
}
return 'void*'
}
return cfn.typ