aboutsummaryrefslogtreecommitdiffstats
path: root/libshiboken
diff options
context:
space:
mode:
authorHugo Lima <hugo.lima@openbossa.org>2010-01-19 13:49:24 -0200
committerHugo Lima <hugo.lima@openbossa.org>2010-01-20 14:19:50 -0200
commita3b3f49ee20164d8cbe9d8ae70d67b7aa834ed92 (patch)
tree8e3a6cf7bd57506cb02c2f1d60cd0307d8a52f8a /libshiboken
parent7c53af9664740467c65724577c9210593e308a85 (diff)
Converter<PyInt> now follows the Converter interface.
- Converter<PyInt>::isConvertible should return bool instead of int and - Converter<PyInt>::toPython must receive "const PyInt&" instead of just "PyInt".
Diffstat (limited to 'libshiboken')
-rw-r--r--libshiboken/conversions.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h
index 97f07cc5e..52ac75848 100644
--- a/libshiboken/conversions.h
+++ b/libshiboken/conversions.h
@@ -213,9 +213,9 @@ inline bool overflowCheck(SourceT value)
template <typename PyIntEquiv>
struct Converter_PyInt
{
- static inline PyIntEquiv isConvertible(PyObject* pyobj) { return PyNumber_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(PyIntEquiv cppobj) { return PyInt_FromLong((long) cppobj); }
+ static inline PyObject* toPython(const PyIntEquiv& cppobj) { return PyInt_FromLong((long) cppobj); }
static PyIntEquiv toCpp(PyObject* pyobj)
{
double d_result;