From e750294ed669ec541a6d297ab4f8906e66204794 Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Thu, 10 Jun 2010 19:57:58 -0300 Subject: Fixed checkType of int and floating point converters. Reviewer: Luciano Wolf Marcelo Lira --- libshiboken/conversions.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libshiboken') diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index 0d9c38608..065820447 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -373,7 +373,7 @@ struct OverFlowChecker template 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(cppobj)); } static inline PyObject* toPython(const PyIntEquiv& cppobj) { return PyInt_FromLong((long) cppobj); } @@ -471,7 +471,7 @@ struct Converter template 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(cppobj)); } static inline PyObject* toPython(PyFloatEquiv cppobj) { return PyFloat_FromDouble((double) cppobj); } -- cgit v1.2.3