]> sigrok.org Git - libsigrok.git/blobdiff - bindings/python/sigrok/core/classes.i
cxx: Implement more of EnumValue in template.
[libsigrok.git] / bindings / python / sigrok / core / classes.i
index be3b404a1054e45f4f6b5f4f0e77732551884af1..1da14d87cc45238701949549cc4181be562fc4d4 100644 (file)
@@ -287,7 +287,7 @@ std::map<std::string, std::string> dict_to_map_string(PyObject *dict)
 /* Convert from a Python type to Glib::Variant, according to config key data type. */
 Glib::VariantBase python_to_variant_by_key(PyObject *input, const sigrok::ConfigKey *key)
 {
-    enum sr_datatype type = key->data_type()->id();
+    enum sr_datatype type = (enum sr_datatype) key->data_type()->id();
 
     if (type == SR_T_UINT64 && PyInt_Check(input))
         return Glib::Variant<guint64>::create(PyInt_AsLong(input));