diff options
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/bindings/swig_python_typemaps.i | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpp/bindings/swig_python_typemaps.i b/cpp/bindings/swig_python_typemaps.i index 7c6e27e17e..d622ee36e2 100644 --- a/cpp/bindings/swig_python_typemaps.i +++ b/cpp/bindings/swig_python_typemaps.i @@ -36,7 +36,7 @@ typedef int Py_ssize_t; if (PyString_Check(value)) return qpid::types::Variant(std::string(PyString_AS_STRING(value))); if (PyInt_Check(value)) return qpid::types::Variant(int64_t(PyInt_AS_LONG(value))); if (PyLong_Check(value)) return qpid::types::Variant(int64_t(PyLong_AsLongLong(value))); - if (PyBool_Check(value)) return qpid::types::Variant(PyInt_AS_LONG(value) ? true : false); + if (PyBool_Check(value)) return qpid::types::Variant(bool(PyInt_AS_LONG(value) ? true : false)); if (PyDict_Check(value)) { qpid::types::Variant::Map map; PyToMap(value, &map); @@ -342,6 +342,9 @@ typedef int Py_ssize_t; $1 = (PyFloat_Check($input) || PyString_Check($input) || PyInt_Check($input) || + PyLong_Check($input) || + PyDict_Check($input) || + PyList_Check($input) || PyBool_Check($input)) ? 1 : 0; } |