X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=bindings%2Fpython%2Fsigrok%2Fcore%2Fclasses.i;h=1da14d87cc45238701949549cc4181be562fc4d4;hb=9d229ecb9e301921284c6264ffc1d956572873df;hp=be3b404a1054e45f4f6b5f4f0e77732551884af1;hpb=3250d8c7e05f2d6a3ffbdf2499af8a13fa99fe39;p=libsigrok.git diff --git a/bindings/python/sigrok/core/classes.i b/bindings/python/sigrok/core/classes.i index be3b404a..1da14d87 100644 --- a/bindings/python/sigrok/core/classes.i +++ b/bindings/python/sigrok/core/classes.i @@ -287,7 +287,7 @@ std::map 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::create(PyInt_AsLong(input));