summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2020-02-13 22:10:05 +0100
committerJens Georg <mail@jensge.org>2020-02-13 22:37:42 +0100
commit7b5e221283f76a8f83510c5f6e705f53966664c5 (patch)
treebc81dd6540f82d4b3bdc2297b19b134b543c3c50
parent1e2de70486f70b1f17f0e9aa69c7242b9fd8fe4c (diff)
downloadrygel-7b5e221283f76a8f83510c5f6e705f53966664c5.tar.gz
core,server: Fix deprecation warning for Vala >= 0.46
-rw-r--r--src/librygel-core/rygel-plugin-loader.vala5
-rw-r--r--src/librygel-server/rygel-engine-loader.vala4
2 files changed, 9 insertions, 0 deletions
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 (),