diff options
Diffstat (limited to 'libshiboken/helper.h')
-rw-r--r-- | libshiboken/helper.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libshiboken/helper.h b/libshiboken/helper.h index 84084fef2..3bda34a7b 100644 --- a/libshiboken/helper.h +++ b/libshiboken/helper.h @@ -85,6 +85,14 @@ inline PyObject* makeTuple(const A& a, const B& b, const C& c, const D& d, const */ LIBSHIBOKEN_API bool PySequenceToArgcArgv(PyObject* argList, int* argc, char*** argv, const char* defaultAppName = 0); +/** + * Convert a python sequence into a heap-allocated array of ints. + * + * \returns The newly allocated array or NULL in case of error or empty sequence. Check with PyErr_Occurred + * if it was successfull. + */ +LIBSHIBOKEN_API int* sequenceToIntArray(PyObject* obj, bool zeroTerminated = false); + } // namespace Shiboken #endif // HELPER_H |