Skip to content

Commit 613d6c0

Browse files
committed
autofree: fix the tests
1 parent 06e4c45 commit 613d6c0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

vlib/v/gen/cgen.v

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1975,9 +1975,9 @@ fn (mut g Gen) autofree_var_call(free_fn_name string, v ast.Var) {
19751975
// tmp expr vars do not need to be freed again here
19761976
return
19771977
}
1978-
if v.is_autofree_tmp {
1979-
return
1980-
}
1978+
// if v.is_autofree_tmp {
1979+
// return
1980+
// }
19811981
if v.typ.is_ptr() {
19821982
g.writeln('\t${free_fn_name}(${c_name(v.name)}); // autofreed ptr var')
19831983
} else {

vlib/v/gen/fn.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,10 +708,10 @@ fn (mut g Gen) autofree_call_postgen(node_pos int) {
708708
return
709709
}
710710
*/
711+
// g.writeln('\n/* strs_to_free3: $g.nr_vars_to_free */')
711712
if g.nr_vars_to_free <= 0 {
712713
return
713714
}
714-
// g.writeln('\n/* strs_to_free3: */')
715715
/*
716716
for s in g.strs_to_free {
717717
g.writeln('string_free(&$s);')

0 commit comments

Comments
 (0)