]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Remove non-working support for conditional compilation
authorJürg Billeter <j@bitron.ch>
Sat, 25 Oct 2008 07:04:11 +0000 (07:04 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sat, 25 Oct 2008 07:04:11 +0000 (07:04 +0000)
2008-10-25  Jürg Billeter  <j@bitron.ch>

* vala/valacodecontext.vala:
* compiler/valacompiler.vala:

Remove non-working support for conditional compilation

svn path=/trunk/; revision=1911

ChangeLog
compiler/valacompiler.vala
vala/valacodecontext.vala

index 1aa1725fb2fe1f7c048d09e91869794acec23640..5c3a9f77d760dc66b76b2228c02b219ffd0ea1a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2008-10-25  Jürg Billeter  <j@bitron.ch>
+
+       * vala/valacodecontext.vala:
+       * compiler/valacompiler.vala:
+
+       Remove non-working support for conditional compilation
+
 2008-10-25  Jürg Billeter  <j@bitron.ch>
 
        * tests/exceptions.exp:
index 80c40cd5495cd729776c00c150753999ca63f454..5b878e371e436a7d2ba9c824f435d80896438421 100644 (file)
@@ -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 */
index 4977c6707f3a206703e80eb9ddfecd98e6f8a91e..236af647af49c4a108768eed0908251063546283 100644 (file)
@@ -144,8 +144,6 @@ public class Vala.CodeContext {
 
        private Gee.List<string> packages = new ArrayList<string> (str_equal);
 
-       private Gee.List<string> defines = new ArrayList<string> (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;