From: Jürg Billeter Date: Sat, 25 Oct 2008 07:04:11 +0000 (+0000) Subject: Remove non-working support for conditional compilation X-Git-Tag: VALA_0_5_1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f5ffccd5ec6ee1d44da441db33614c5edede581;p=thirdparty%2Fvala.git Remove non-working support for conditional compilation 2008-10-25 Jürg Billeter * vala/valacodecontext.vala: * compiler/valacompiler.vala: Remove non-working support for conditional compilation svn path=/trunk/; revision=1911 --- diff --git a/ChangeLog b/ChangeLog index 1aa1725fb..5c3a9f77d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-25 Jürg Billeter + + * vala/valacodecontext.vala: + * compiler/valacompiler.vala: + + Remove non-working support for conditional compilation + 2008-10-25 Jürg Billeter * tests/exceptions.exp: diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index 80c40cd54..5b878e371 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -49,8 +49,6 @@ class Vala.Compiler { [NoArrayLength] static string[] cc_options; static bool save_temps; - [NoArrayLength] - static string[] defines; static bool quiet_mode; private CodeContext context; @@ -67,7 +65,6 @@ class Vala.Compiler { { "output", 'o', 0, OptionArg.FILENAME, ref output, "Place output in file FILE", "FILE" }, { "debug", 'g', 0, OptionArg.NONE, ref debug, "Produce debug information", null }, { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support", null }, - { "define", 'D', 0, OptionArg.STRING_ARRAY, ref defines, "Define SYMBOL", "SYMBOL..." }, { "disable-assert", 0, 0, OptionArg.NONE, ref disable_assert, "Disable assertions", null }, { "disable-checking", 0, 0, OptionArg.NONE, ref disable_checking, "Disable run-time checks", null }, { "disable-non-null", 0, 0, OptionArg.NONE, ref disable_non_null, "Disable non-null types", null }, @@ -182,12 +179,6 @@ class Vala.Compiler { Report.error (null, "This version of valac only supports GLib 2"); } - if (defines != null) { - foreach (string define in defines) { - context.add_define (define); - } - } - context.codegen = new CCodeGenerator (); /* default packages */ diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index 4977c6707..236af647a 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -144,8 +144,6 @@ public class Vala.CodeContext { private Gee.List packages = new ArrayList (str_equal); - private Gee.List defines = new ArrayList (str_equal); - /** * The root namespace of the symbol tree. * @@ -377,24 +375,6 @@ public class Vala.CodeContext { file.mark = 2; } - public void add_define (string define) { - defines.add (define); - } - - public bool ignore_node (CodeNode node) { - var attr = node.get_attribute ("Conditional"); - if (attr == null) { - return false; - } else { - var condition = attr.get_string ("condition"); - if (condition == null) { - return false; - } else { - return !defines.contains (condition); - } - } - } - public string? get_package_path (string pkg, [CCode (array_length_pos = 1.9)] string[] vapi_directories) { string basename = "%s.vapi".printf (pkg); string filename = null;