diff options
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r-- | PySide/typesystem_templates.xml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index 2903ae408..61b1471de 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -413,6 +413,15 @@ %out << cppItem; } </template> + <template name="pyseq_to_cppvector_conversion"> + int the_size = PySequence_Size(%in); + %out.reserve(the_size); + for (int i = 0; i < the_size; ++i) { + Shiboken::AutoDecRef pyItem(PySequence_GetItem(%in, i)); + %OUTTYPE_0 cppItem = %CONVERTTOCPP[%OUTTYPE_0](pyItem); + %out << cppItem; + } + </template> <template name="checkPyCapsuleOrPyCObject_func"> static bool checkPyCapsuleOrPyCObject(PyObject* pyObj) |