Skip to content

Commit

Permalink
[cpp] Make stack frame variables static if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
hughsando committed Jan 5, 2017
1 parent 10609a0 commit e3b8bcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/generators/gencpp.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1358,7 +1358,7 @@ let hx_stack_push ctx output clazz func_name pos gc_stack =
if ctx.ctx_is_header then
ctx.ctx_writer#write_h_unique ("HX_DECLARE_STACK_FRAME" ^ "(" ^ varName ^ ")\n")
else
ctx.ctx_writer#write_h_unique ("HX_DEFINE_STACK_FRAME" ^ "(" ^ decl ^ ")\n");
ctx.ctx_writer#write_h_unique ( (if func_name="new" then "HX_DEFINE_STACK_FRAME" else "HX_LOCAL_STACK_FRAME") ^ "(" ^ decl ^ ")\n");
output ( (if gc_stack then "HX_GC_STACKFRAME" else "HX_STACKFRAME") ^ "(&" ^ varName ^ ")\n");
end else if gc_stack then
output ("HX_JUST_GC_STACKFRAME\n")
Expand Down

0 comments on commit e3b8bcc

Please sign in to comment.