summaryrefslogtreecommitdiffstats
path: root/tools/wixl/util.vala
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-01-24 17:57:19 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2013-01-24 18:30:12 +0100
commit9c127b32a27e5077f4688f5241ef1890f0217038 (patch)
tree7f85187f67a554e33f3775487cd5914e19c7b632 /tools/wixl/util.vala
parent252a23c3b0ec1794e36eed77c130f848100b9512 (diff)
downloadmsitools-9c127b32a27e5077f4688f5241ef1890f0217038.tar.gz
msitools-9c127b32a27e5077f4688f5241ef1890f0217038.tar.xz
msitools-9c127b32a27e5077f4688f5241ef1890f0217038.zip
wixl: do not use enum_from_string directly, make it generic
The right spelling is multiString, not multi-string as defined by vala, so we cannot use enum_from_string. Thus do not make it public and use it internally from a (possibly more complex) from_string static method of the enum. I haven't checked the usage in msi-default.vala.
Diffstat (limited to 'tools/wixl/util.vala')
-rw-r--r--tools/wixl/util.vala4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/wixl/util.vala b/tools/wixl/util.vala
index 13269c7..1b201ec 100644
--- a/tools/wixl/util.vala
+++ b/tools/wixl/util.vala
@@ -23,8 +23,8 @@ namespace Wixl {
return (string) udn;
}
- public int enum_from_string (Type t, string str) throws GLib.Error {
- var k = (EnumClass)t.class_ref ();
+ public G enum_from_string<G> (string str) throws GLib.Error {
+ var k = (EnumClass)typeof(G).class_ref ();
var v = k.get_value_by_nick (str);
if (v == null)