summaryrefslogtreecommitdiffstats
path: root/libshiboken/conversions.h
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-06-10 19:57:58 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-06-10 20:20:49 -0300
commite750294ed669ec541a6d297ab4f8906e66204794 (patch)
tree180802708dfac60762c3969f0b4d0a1654332f86 /libshiboken/conversions.h
parentd1ec4ab5b10d8d2ef125af08bccf467076791815 (diff)
downloadshiboken-e750294ed669ec541a6d297ab4f8906e66204794.tar.gz
shiboken-e750294ed669ec541a6d297ab4f8906e66204794.tar.xz
shiboken-e750294ed669ec541a6d297ab4f8906e66204794.zip
Fixed checkType of int and floating point converters.
Reviewer: Luciano Wolf <luciano.wolf@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libshiboken/conversions.h')
-rw-r--r--libshiboken/conversions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index 0d9c3860..06582044 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -373,7 +373,7 @@ struct OverFlowChecker<float, true>
template <typename PyIntEquiv>
struct Converter_PyInt
{
- static inline bool checkType(PyObject* pyobj) { return PyNumber_Check(pyobj); }
+ static inline bool checkType(PyObject* pyobj) { return PyInt_Check(pyobj); }
static inline bool isConvertible(PyObject* pyobj) { return PyNumber_Check(pyobj); }
static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast<PyIntEquiv*>(cppobj)); }
static inline PyObject* toPython(const PyIntEquiv& cppobj) { return PyInt_FromLong((long) cppobj); }
@@ -471,7 +471,7 @@ struct Converter<unsigned PY_LONG_LONG>
template <typename PyFloatEquiv>
struct Converter_PyFloat
{
- static inline bool checkType(PyObject* obj) { return PyNumber_Check(obj); }
+ static inline bool checkType(PyObject* obj) { return PyFloat_Check(obj); }
static inline bool isConvertible(PyObject* obj) { return PyNumber_Check(obj); }
static inline PyObject* toPython(void* cppobj) { return toPython(*reinterpret_cast<PyFloatEquiv*>(cppobj)); }
static inline PyObject* toPython(PyFloatEquiv cppobj) { return PyFloat_FromDouble((double) cppobj); }