cgen: generate static C functions

pull/4680/head
eyelash 2020-05-02 10:42:38 +02:00 committed by GitHub
parent 06173834c0
commit 716d867f25
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -89,6 +89,10 @@ fn (mut g Gen) gen_fn_decl(it ast.FnDecl) {
g.write('$type_name ${impl_fn_name}(')
}
} else {
if !it.is_pub {
g.write('static ')
g.definitions.write('static ')
}
g.definitions.write('$type_name ${name}(')
g.write('$type_name ${name}(')
}