[msitools] wixl: do not use g_hash_table_add
- From: Marc-Andre Lureau <malureau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [msitools] wixl: do not use g_hash_table_add
- Date: Thu, 17 Jan 2013 16:37:05 +0000 (UTC)
commit 07119d1476db0a7568f79cbc855a888007dc7400
Author: Paolo Bonzini <pbonzini redhat com>
Date: Thu Jan 17 08:57:26 2013 +0100
wixl: do not use g_hash_table_add
This is not supported in GLib 2.22, which is the version used in RHEL6.
tools/wixl/msi.vala | 2 +-
tools/wixl/preprocessor.vala | 2 +-
tools/wixl/util.vala | 4 ++++
3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/tools/wixl/msi.vala b/tools/wixl/msi.vala
index 10bdccd..15092c5 100644
--- a/tools/wixl/msi.vala
+++ b/tools/wixl/msi.vala
@@ -69,7 +69,7 @@ namespace Wixl {
public HashTable<Action, Action*> depends_on = new HashTable<Action, Action*> (direct_hash, direct_equal);
public void add_dep (Action a) {
- depends_on.add (a);
+ hash_table_add (depends_on, a);
a.incoming_deps = true;
}
}
diff --git a/tools/wixl/preprocessor.vala b/tools/wixl/preprocessor.vala
index 73fe114..98c95c9 100644
--- a/tools/wixl/preprocessor.vala
+++ b/tools/wixl/preprocessor.vala
@@ -277,7 +277,7 @@ namespace Wixl {
if (is_req) {
if (requires.lookup_extended (name, null, null))
return;
- requires.add (name);
+ hash_table_add (requires, name);
}
string[] dirs = {};
diff --git a/tools/wixl/util.vala b/tools/wixl/util.vala
index 29d9734..e7fadcc 100644
--- a/tools/wixl/util.vala
+++ b/tools/wixl/util.vala
@@ -32,6 +32,10 @@ namespace Wixl {
return v.value;
}
+ public void hash_table_add<G> (HashTable<G, G*> h, G o) {
+ h.replace (o, o);
+ }
+
public string add_braces (string str) {
if (str[0] == '{')
return str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]