[rygel] core,server: Fix deprecation warning for Vala >= 0.46
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core,server: Fix deprecation warning for Vala >= 0.46
- Date: Sun, 23 Feb 2020 11:41:09 +0000 (UTC)
commit ede23734d75029ebe94cc4f1c6a50b274c69fe15
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]