diff options
Diffstat (limited to 'pyuno/source')
-rw-r--r-- | pyuno/source/module/pyuno_runtime.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/pyuno/source/module/pyuno_runtime.cxx b/pyuno/source/module/pyuno_runtime.cxx index 283ffc53edd8..8eb64c7fe54d 100644 --- a/pyuno/source/module/pyuno_runtime.cxx +++ b/pyuno/source/module/pyuno_runtime.cxx @@ -39,6 +39,7 @@ #include <com/sun/star/script/Converter.hpp> #include <com/sun/star/script/InvocationAdapterFactory.hpp> #include <com/sun/star/reflection/theCoreReflection.hpp> +#include <comphelper/sequence.hxx> using com::sun::star::uno::Reference; @@ -636,11 +637,7 @@ bool Runtime::pyIterUnpack( PyObject *const pObj, Any &a ) const items.push_back( pyObject2Any( rItem.get() ) ); } while( (pItem = PyIter_Next( pObj )) ); - Sequence<Any> aSeq( items.size() ); - ::std::list<Any>::iterator it = items.begin(); - for( int i = 0; it != items.end(); ++it ) - aSeq[i++] = *it; - a <<= aSeq; + a <<= comphelper::containerToSequence<Any>(items); return true; } |