[rygel/wip/phako/remove-warnings: 3/14] core, server: Fix deprecation warning for Vala >= 0.46



commit 7b5e221283f76a8f83510c5f6e705f53966664c5
Author: Jens Georg <mail jensge org>
Date:   Thu Feb 13 22:10:05 2020 +0100

    core,server: Fix deprecation warning for Vala >= 0.46

 src/librygel-core/rygel-plugin-loader.vala   | 5 +++++
 src/librygel-server/rygel-engine-loader.vala | 4 ++++
 2 files changed, 9 insertions(+)
---
diff --git a/src/librygel-core/rygel-plugin-loader.vala b/src/librygel-core/rygel-plugin-loader.vala
index 7ffacb2a..736a0443 100644
--- a/src/librygel-core/rygel-plugin-loader.vala
+++ b/src/librygel-core/rygel-plugin-loader.vala
@@ -107,8 +107,13 @@ public class Rygel.PluginLoader : RecursiveModuleLoader {
             return true;
         }
 
+#if VALA_0_46
+        Module module = Module.open (module_file.get_path (),
+                                     ModuleFlags.LOCAL);
+#else
         Module module = Module.open (module_file.get_path (),
                                      ModuleFlags.BIND_LOCAL);
+#endif
         if (module == null) {
             warning (_("Failed to load module from path ā€œ%sā€: %s"),
                      module_file.get_path (),
diff --git a/src/librygel-server/rygel-engine-loader.vala b/src/librygel-server/rygel-engine-loader.vala
index 65644a36..e0c32016 100644
--- a/src/librygel-server/rygel-engine-loader.vala
+++ b/src/librygel-server/rygel-engine-loader.vala
@@ -63,7 +63,11 @@ internal class Rygel.EngineLoader : RecursiveModuleLoader {
             }
         }
 
+#if VALA_0_46
+        var module = Module.open (file.get_path (), ModuleFlags.LOCAL);
+#else
         var module = Module.open (file.get_path (), ModuleFlags.BIND_LOCAL);
+#endif
         if (module == null) {
             debug ("Failed to load engine %s: %s",
                    file.get_path (),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]