summaryrefslogtreecommitdiff
path: root/ccode
diff options
context:
space:
mode:
authorLuca Bruno <lucabru@src.gnome.org>2014-12-24 23:20:58 +0100
committerRico Tzschichholz <ricotz@ubuntu.com>2017-05-09 13:49:28 +0200
commite42314a753a257b7e80967350a72699e7e68428e (patch)
tree3cf70c400695c1506163a8b343c3194d15d4a415 /ccode
parent5007588ab7b225223055f2709a275036da8138f7 (diff)
downloadvala-e42314a753a257b7e80967350a72699e7e68428e.tar.gz
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
Diffstat (limited to 'ccode')
-rw-r--r--ccode/valaccodefunction.vala6
1 files changed, 5 insertions, 1 deletions
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<CCodeParameter> parameters = new ArrayList<CCodeParameter> ();
- CCodeBlock current_block;
List<CCodeStatement> statement_stack = new ArrayList<CCodeStatement> ();
public CCodeFunction (string name, string return_type = "void") {