]> sigrok.org Git - libsigrok.git/blobdiff - bindings/swig/templates.i
bindings: New configuration enumeration API.
[libsigrok.git] / bindings / swig / templates.i
index f160866d21161db76c2bc2368b886f1b52bcd1f6..1baaf0fe3a6ca93861e689baa57b37602e067094 100644 (file)
@@ -60,20 +60,22 @@ namespace std {
    for the map instantiation from compiling. */
 %template(ConfigVector)
     std::vector<const sigrok::ConfigKey *>;
+
 %template(ConfigMap)
     std::map<const sigrok::ConfigKey *, Glib::VariantBase>;
 
-/* Currently broken on Python. */
-#ifndef SWIGPYTHON
+%template(ConfigSet)
+    std::set<const sigrok::ConfigKey *>;
+
+/* Workaround for SWIG bug. The vector template instantiation
+   isn't needed but somehow fixes a bug that stops the wrapper
+   for the set instantiation from compiling. */
+%template(CapabilityVector)
+    std::vector<const sigrok::Capability *>;
 
 %template(CapabilitySet)
     std::set<const sigrok::Capability *>;
 
-%template(ConfigKeys)
-    std::map<const sigrok::ConfigKey *, std::set<const sigrok::Capability *> >;
-
-#endif
-
 %template(OptionVector)
     std::vector<std::shared_ptr<sigrok::Option> >;
 %template(OptionMap)