Skip to content

Commit

Permalink
fix capture policy (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simn committed Mar 26, 2014
1 parent c3b7429 commit aade0fc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common.ml
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ let get_config com =
pf_locals_scope = false;
pf_captured_scope = false;
pf_unique_locals = false;
pf_capture_policy = CPWrapRef;
pf_capture_policy = CPLoopVars;
pf_pad_nulls = false;
pf_add_final_return = false;
pf_overload = false;
Expand Down
3 changes: 1 addition & 2 deletions genpy.ml
Original file line number Diff line number Diff line change
Expand Up @@ -749,11 +749,10 @@ module Transformer = struct
| (_, TCall(e, params)) ->
let e = trans true [] e in
let params = List.map (trans true []) params in
let blocks = List.flatten (List.map (fun (p) -> p.a_blocks) params) in
let blocks = e.a_blocks @ (List.flatten (List.map (fun (p) -> p.a_blocks) params)) in
let params = List.map (fun (p) -> p.a_expr) params in
let e = { a_expr with eexpr = TCall(e.a_expr, params) } in
lift_expr ~blocks:blocks e

| (true, TArray(e1, e2)) ->
let e1 = trans true [] e1 in
let e2 = trans true [] e2 in
Expand Down

0 comments on commit aade0fc

Please sign in to comment.