diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-13 13:57:09 -0200 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-01-13 15:16:39 -0200 |
commit | c06ceb1aab9b8199a75f9b9572a0556c8b9a6a97 (patch) | |
tree | 7fd766b2b4c469e865f1d8b38a6b0849d9355ff2 /libshiboken | |
parent | 1bfff6f2f2549dd3a4e068e5bd767f72d8c7bd8b (diff) |
Fix transfer ownership on return values.
Reviewed by Marcelo Lira <marcelo.lira@openbossa.org>
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/conversions.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index 2564c150b..1dc00b00f 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -210,6 +210,7 @@ inline bool overflowCheck(SourceT value) template <typename PyIntEquiv> struct Converter_PyInt { + static inline PyIntEquiv 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 PyIntEquiv toCpp(PyObject* pyobj) |