mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
compiler: make [live] fn unlock its mutex on early return
This commit is contained in:

committed by
Alexander Medvednikov

parent
26374971ab
commit
4838dda59a
@ -54,6 +54,11 @@ fn (p mut Parser) gen_fn_decl(f Fn, typ, str_args string) {
|
||||
dll_export_linkage := if p.pref.ccompiler == 'msvc' && p.attr == 'live' && p.pref.is_so { '__declspec(dllexport) ' } else if p.attr == 'inline' { 'static inline ' } else { '' }
|
||||
fn_name_cgen := p.table.fn_gen_name(f)
|
||||
// str_args := f.str_args(p.table)
|
||||
|
||||
if p.attr == 'live' && p.pref.is_so {
|
||||
// See fn.v for details about impl_live_ functions
|
||||
p.genln('$typ impl_live_${fn_name_cgen} ($str_args);')
|
||||
}
|
||||
p.genln('$dll_export_linkage$typ $fn_name_cgen ($str_args) {')
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user