Commit b5d3e0f3 authored by Rico Tzschichholz's avatar Rico Tzschichholz

codegen: Emit initializer for enum-value into wanted declaration space

Fixes #167
parent 2471bae2
......@@ -825,6 +825,9 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
cenum.modifiers |= (en.version.deprecated ? CCodeModifiers.DEPRECATED : 0);
var current_cfile = cfile;
cfile = decl_space;
int flag_shift = 0;
foreach (EnumValue ev in en.get_values ()) {
CCodeEnumValue c_ev;
......@@ -842,6 +845,8 @@ public abstract class Vala.CCodeBaseModule : CodeGenerator {
cenum.add_value (c_ev);
}
cfile = current_cfile;
decl_space.add_type_definition (cenum);
decl_space.add_type_definition (new CCodeNewline ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment