summaryrefslogtreecommitdiff
path: root/codegen/valatyperegisterfunction.vala
diff options
context:
space:
mode:
Diffstat (limited to 'codegen/valatyperegisterfunction.vala')
-rw-r--r--codegen/valatyperegisterfunction.vala5
1 files changed, 3 insertions, 2 deletions
diff --git a/codegen/valatyperegisterfunction.vala b/codegen/valatyperegisterfunction.vala
index 5f8d2be0f..ce45c793f 100644
--- a/codegen/valatyperegisterfunction.vala
+++ b/codegen/valatyperegisterfunction.vala
@@ -161,13 +161,14 @@ public abstract class Vala.TypeRegisterFunction {
var clist = new CCodeInitializerList (); /* or during visit time? */
CCodeInitializerList clist_ev = null;
- foreach (EnumValue ev in en.get_values ()) {
+ en.get_values ().foreach ((ev) => {
clist_ev = new CCodeInitializerList ();
clist_ev.append (new CCodeConstant (CCodeBaseModule.get_ccode_name (ev)));
clist_ev.append (new CCodeIdentifier ("\"%s\"".printf (CCodeBaseModule.get_ccode_name (ev))));
clist_ev.append (CCodeBaseModule.get_enum_value_canonical_cconstant (ev));
clist.append (clist_ev);
- }
+ return true;
+ });
clist_ev = new CCodeInitializerList ();
clist_ev.append (new CCodeConstant ("0"));