enable non-null types by default, replace --enable-non-null commandline
authorJuerg Billeter <j@bitron.ch>
Sun, 13 Apr 2008 19:05:00 +0000 (19:05 +0000)
committerJürg Billeter <juergbi@src.gnome.org>
Sun, 13 Apr 2008 19:05:00 +0000 (19:05 +0000)
2008-04-13  Juerg Billeter  <j@bitron.ch>

* compiler/valacompiler.vala: enable non-null types by default,
  replace --enable-non-null commandline option by --disable-non-null

svn path=/trunk/; revision=1213

ChangeLog
compiler/valacompiler.vala

index 1146d62..b1b95a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-04-13  Jürg Billeter  <j@bitron.ch>
 
+       * compiler/valacompiler.vala: enable non-null types by default,
+         replace --enable-non-null commandline option by --disable-non-null
+
+2008-04-13  Jürg Billeter  <j@bitron.ch>
+
        * */*.vala: fix build when using non-null types
 
 2008-04-13  Jürg Billeter  <j@bitron.ch>
index 9767f24..d576573 100644 (file)
@@ -42,7 +42,7 @@ class Vala.Compiler : Object {
        static bool thread;
        static bool disable_assert;
        static bool disable_checking;
-       static bool non_null;
+       static bool disable_non_null;
        static bool non_null_experimental;
        static bool verbose;
        static string cc_command;
@@ -70,7 +70,7 @@ class Vala.Compiler : Object {
                { "define", 'D', 0, OptionArg.STRING_ARRAY, out 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 },
-               { "enable-non-null", 0, 0, OptionArg.NONE, ref non_null, "Enable non-null types", null },
+               { "disable-non-null", 0, 0, OptionArg.NONE, ref disable_non_null, "Disable non-null types", null },
                { "enable-non-null-experimental", 0, 0, OptionArg.NONE, ref non_null_experimental, "Enable experimental enhancements for non-null types", null },
                { "cc", 0, 0, OptionArg.STRING, out cc_command, "Use COMMAND as C compiler command", "COMMAND" },
                { "Xcc", 'X', 0, OptionArg.STRING_ARRAY, out cc_options, "Pass OPTION to the C compiler", "OPTION..." },
@@ -146,7 +146,7 @@ class Vala.Compiler : Object {
                context.library = library;
                context.assert = !disable_assert;
                context.checking = !disable_checking;
-               context.non_null = non_null || non_null_experimental || true;
+               context.non_null = !disable_non_null || non_null_experimental;
                context.non_null_experimental = non_null_experimental;
                Report.set_verbose_errors (verbose);