From e42314a753a257b7e80967350a72699e7e68428e Mon Sep 17 00:00:00 2001 From: Luca Bruno Date: Wed, 24 Dec 2014 23:20:58 +0100 Subject: codegen: Fix finally blocks with async yields The Method.yield_count is not correct because in C the finally blocks may be emitted twice. https://bugzilla.gnome.org/show_bug.cgi?id=741929 --- ccode/valaccodefunction.vala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ccode') diff --git a/ccode/valaccodefunction.vala b/ccode/valaccodefunction.vala index 08d3876fb..ef8dad6a8 100644 --- a/ccode/valaccodefunction.vala +++ b/ccode/valaccodefunction.vala @@ -48,9 +48,13 @@ public class Vala.CCodeFunction : CCodeNode { */ public CCodeLineDirective current_line { get; set; } + /** + * The current block to be written into. + */ + public CCodeBlock current_block { get; set; } + private List parameters = new ArrayList (); - CCodeBlock current_block; List statement_stack = new ArrayList (); public CCodeFunction (string name, string return_type = "void") { -- cgit v1.2.1