diff options
author | Mason Bogue <scythe@ortsz.com> | 2020-03-20 18:42:59 -0400 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2020-04-05 11:08:54 +0200 |
commit | 9f3249212112526353d41b875bf56b2eac6e9a47 (patch) | |
tree | 6a05772b80f60be4d0cde2d8d4ce770e78209f8b /ccode | |
parent | 3d7760835e56a04a939c17a35a6db1c542415d6d (diff) | |
download | vala-9f3249212112526353d41b875bf56b2eac6e9a47.tar.gz |
vala: Drop --use-header compiler option and enable it by default
Import definitions from generated header files if available
Fixes https://gitlab.gnome.org/GNOME/vala/issues/713
Diffstat (limited to 'ccode')
-rw-r--r-- | ccode/valaccodefile.vala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/ccode/valaccodefile.vala b/ccode/valaccodefile.vala index a82eac5c0..7145946b1 100644 --- a/ccode/valaccodefile.vala +++ b/ccode/valaccodefile.vala @@ -22,7 +22,7 @@ public class Vala.CCodeFile { - public CCodeFileType cfile_type { get; set; } + public CCodeFileType file_type { get; private set; } public weak SourceFile? file { get; private set; } @@ -39,11 +39,9 @@ public class Vala.CCodeFile { CCodeFragment constant_declaration = new CCodeFragment (); CCodeFragment type_member_definition = new CCodeFragment (); - public CCodeFile (SourceFile? source_file = null) { + public CCodeFile (CCodeFileType type = CCodeFileType.SOURCE, SourceFile? source_file = null) { file = source_file; - if (source_file != null) { - cfile_type = CCodeFileType.SOURCE; - } + file_type = type; } public bool add_declaration (string name) { @@ -154,7 +152,7 @@ public class Vala.CCodeFile { return false; } - if (cfile_type == CCodeFileType.SOURCE) { + if (file_type == CCodeFileType.SOURCE) { writer.line_directives = line_directives; comments.write (writer); |