]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
Ignore --thread commandline option and drop all gthread-2.0 references
authorRico Tzschichholz <ricotz@ubuntu.com>
Mon, 10 Oct 2016 08:05:04 +0000 (10:05 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Mon, 10 Oct 2016 08:40:54 +0000 (10:40 +0200)
With vala 0.32 there was no further support for glib < 2.32.

codegen/valaccodecompiler.vala
codegen/valaccodemethodmodule.vala
compiler/valacompiler.vala
configure.ac
contrib/parvala/parvala
doc/valac.1
gobject-introspection/Makefile.am
gobject-introspection/scanner.c
vala/valacodecontext.vala

index 1ad3f0803e6f81828f47ecee5c4a950957e00e99..52161b4229a427755e2e0812479407bf0999db5b 100644 (file)
@@ -61,9 +61,6 @@ public class Vala.CCodeCompiler {
                }
                use_pkgconfig = true;
                pc += " gobject-2.0";
-               if (context.thread) {
-                       pc += " gthread-2.0";
-               }
                foreach (string pkg in context.get_packages ()) {
                        if (package_exists (pkg, pkg_config_command)) {
                                use_pkgconfig = true;
index d147eb18b721ecc2fca94e4fc4b2f2ae29824810..aa2ab5c8c2ed0c77a9a0ae8da9d79229ddcd0251 100644 (file)
@@ -836,16 +836,6 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule {
                                ccode.add_expression (mem_profiler_init_call);
                        }
 
-                       if (context.thread) {
-                               var thread_init_call = new CCodeFunctionCall (new CCodeIdentifier ("g_thread_init"));
-                               thread_init_call.line = cmain.line;
-                               thread_init_call.add_argument (new CCodeConstant ("NULL"));
-
-                               var cond = new CCodeIfSection ("!GLIB_CHECK_VERSION (2,32,0)");
-                               ccode.add_statement (cond);
-                               cond.append (new CCodeExpressionStatement (thread_init_call));
-                       }
-
                        var cond = new CCodeIfSection ("!GLIB_CHECK_VERSION (2,35,0)");
                        ccode.add_statement (cond);
                        cond.append (new CCodeExpressionStatement (new CCodeFunctionCall (new CCodeIdentifier ("g_type_init"))));
index ccf5b76f39d11dee0d6d4b0a26075749374e8852..38564fc93f722ee66a67f66a23777d902fcf001e 100644 (file)
@@ -124,7 +124,7 @@ class Vala.Compiler {
                { "compile", 'c', 0, OptionArg.NONE, ref compile_only, "Compile but do not link", null },
                { "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 },
+               { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support (DEPRECATED AND IGNORED)", null },
                { "enable-mem-profiler", 0, 0, OptionArg.NONE, ref mem_profiler, "Enable GLib memory profiler", null },
                { "define", 'D', 0, OptionArg.STRING_ARRAY, ref defines, "Define SYMBOL", "SYMBOL..." },
                { "main", 0, 0, OptionArg.STRING, ref entry_point, "Use SYMBOL as entry point", "SYMBOL..." },
@@ -242,7 +242,6 @@ class Vala.Compiler {
                context.gir_directories = gir_directories;
                context.metadata_directories = metadata_directories;
                context.debug = debug;
-               context.thread = thread;
                context.mem_profiler = mem_profiler;
                context.save_temps = save_temps;
                if (ccode_only && save_temps) {
index 744a26f50613b7498ce92c8dab73d7d4fdafe872..f12d4efbc42399e9de6079744643afa5580081f1 100644 (file)
@@ -81,11 +81,6 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED)
 AC_SUBST(GMODULE_CFLAGS)
 AC_SUBST(GMODULE_LIBS)
 
-PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED)
-
-AC_SUBST(GTHREAD_CFLAGS)
-AC_SUBST(GTHREAD_LIBS)
-
 AC_PATH_PROG([XSLTPROC], [xsltproc], :)
 AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :)
 
index db53b8f59e62530e9b9d7ebdd17175a69387c463..bdea5c1e9b6173899321e5c47665095feccf62e4 100755 (executable)
@@ -20,7 +20,6 @@ while test -n "$*"; do
     --directory=*) VALAFLAGS="${VALAFLAGS} $1";;
     --basedir=*) VALAFLAGS="${VALAFLAGS} $1";;
     --enable-checking) VALAFLAGS="${VALAFLAGS} $1";;
-    --thread) VALAFLAGS="${VALAFLAGS} $1";;
     --pkg=*) VALAFLAGS="${VALAFLAGS} $1";;
     --vapidir=*) VALAFLAGS="${VALAFLAGS} $1";;
     -X) shift; VALAFLAGS="${VALAFLAGS} -X $1";;
index 2d3f70b238c085ec6571f2291f02f2222ac8118a..d92368abe729e5ce02e785ba8064b59b28e13074 100644 (file)
@@ -88,7 +88,7 @@ Place output in file \fIFILE\fR
 Produce debug information
 .TP
 .B \--thread
-Enable multithreading support
+Enable multithreading support (DEPRECATED AND IGNORED)
 .TP
 .B \--enable-mem-profiler
 Enable GLib memory profiler
index 9b30e1f27f4408dbe55d1fe9ba0ad42090a94530..78d733e4f6a0ab076b12e412103286fdec4a06ec 100644 (file)
@@ -44,7 +44,6 @@ gen_introspect_SOURCES = \
 gen_introspect_LDADD = \
        $(GLIB_LIBS) \
        $(GMODULE_LIBS) \
-       $(GTHREAD_LIBS) \
        libgidl.la \
        $(NULL)
 
index 40e4efec5ae40b6635887fbcf07c0c25a90dc5ee..34728c1154a636b23ef115a2ca7c3d88eeb00f8d 100644 (file)
@@ -1783,11 +1783,6 @@ main (int argc, char **argv)
 
   g_type_init ();
 
-  /* initialize threading as this may be required by libraries that we'll use
-   * libsoup-2.2 is an example of that.
-   */
-  g_thread_init (NULL);
-
   if (include_idls)
     {
       for (i = 0; i < g_strv_length (include_idls); i++)
index ddb9fdfb1ffd8784af11d676385c8052284c4879..0407561bc77c0e49ad9e788f79295101db56541b 100644 (file)
@@ -138,11 +138,6 @@ public class Vala.CodeContext {
         */
        public int optlevel { get; set; }
 
-       /**
-        * Enable multithreading support.
-        */
-       public bool thread { get; set; }
-
        /**
         * Enable memory profiler.
         */