Browse Source

Fix special _this variable in closures

Hugh Sanderson 13 years ago
parent
commit
86d49c17a7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      gencpp.ml

+ 1 - 1
gencpp.ml

@@ -1155,7 +1155,7 @@ and define_local_return_block_ctx ctx expression name =
 	let output_i = writer#write_i in
 	let output = ctx.ctx_output in
 	let check_this = function | "this" when not ctx.ctx_real_this_ptr -> "__this" | x -> x in
-	let reference = function | "this" -> " *__this" | name -> " &" ^name in
+	let reference = function | "this" -> " *__this" | "_this" -> " _this" | name -> " &" ^name in
 	let rec define_local_return_block expression  =
 		let declarations = Hashtbl.create 0 in
 		let undeclared = Hashtbl.create 0 in