diff options
author | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-17 14:12:00 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2010-03-18 19:45:08 -0300 |
commit | 75ce5d993f212581ba2fb1e623fed2c585f1c216 (patch) | |
tree | 4e1183d5703021bd1eb60c42685095b17b34018c /libshiboken | |
parent | 1c1002df611d9f0283379a94e943c0563a9f8804 (diff) |
Speed up conversions of lists from python to c++ if the list class
is binded by Shiboken (like QStringList).
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/conversions.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index 97c73fd7d..13e711d85 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -546,6 +546,9 @@ struct StdListConverter } static StdList toCpp(PyObject* pyobj) { + if (PyObject_TypeCheck(pyobj, SbkType<StdList>())) + return *reinterpret_cast<StdList*>(SbkBaseWrapper_cptr(pyobj)); + StdList result; for (int i = 0; i < PySequence_Size(pyobj); i++) { PyObject* pyItem = PySequence_GetItem(pyobj, i); |