You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2010/08/13 00:34:23 UTC
svn commit: r985019 - /qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i
Author: tross
Date: Thu Aug 12 22:34:23 2010
New Revision: 985019
URL: http://svn.apache.org/viewvc?rev=985019&view=rev
Log:
Added some missing typecasts and type-check clauses.
Modified:
qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i
Modified: qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i?rev=985019&r1=985018&r2=985019&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i (original)
+++ qpid/trunk/qpid/cpp/bindings/swig_python_typemaps.i Thu Aug 12 22:34:23 2010
@@ -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;
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org