mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ast: bring back Table.free() for now
This commit is contained in:
parent
eaf8b63dd2
commit
03ed32f805
@ -39,7 +39,8 @@ pub mut:
|
||||
// When table.gostmts > 0, __VTHREADS__ is defined, which can be checked with `$if threads {`
|
||||
}
|
||||
|
||||
/*
|
||||
// used by vls to avoid leaks
|
||||
// TODO remove manual memory management
|
||||
[unsafe]
|
||||
pub fn (t &Table) free() {
|
||||
unsafe {
|
||||
@ -59,7 +60,6 @@ pub fn (t &Table) free() {
|
||||
t.used_vweb_types.free()
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
pub type FnPanicHandler = fn (&Table, string)
|
||||
|
||||
|
@ -1229,7 +1229,7 @@ fn (mut g Gen) call_args(node ast.CallExpr) {
|
||||
elem_type := g.typ(arr_info.elem_type)
|
||||
if g.pref.translated && args.len == 1 {
|
||||
// Handle `foo(c'str')` for `fn foo(args ...&u8)`
|
||||
// TODO handle this in a better place
|
||||
// TODOC2V handle this in a better place
|
||||
// println(g.table.type_to_str(args[0].typ))
|
||||
g.expr(args[0].expr)
|
||||
} else if args.len > 0 && args[args.len - 1].expr is ast.ArrayDecompose {
|
||||
|
Loading…
Reference in New Issue
Block a user