From 75ce5d993f212581ba2fb1e623fed2c585f1c216 Mon Sep 17 00:00:00 2001 From: Hugo Lima Date: Wed, 17 Mar 2010 14:12:00 -0300 Subject: Speed up conversions of lists from python to c++ if the list class is binded by Shiboken (like QStringList). --- libshiboken/conversions.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libshiboken') 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())) + return *reinterpret_cast(SbkBaseWrapper_cptr(pyobj)); + StdList result; for (int i = 0; i < PySequence_Size(pyobj); i++) { PyObject* pyItem = PySequence_GetItem(pyobj, i); -- cgit v1.2.3