diff options
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r-- | PySide/typesystem_templates.xml | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml index c61673bf7..f28d26142 100644 --- a/PySide/typesystem_templates.xml +++ b/PySide/typesystem_templates.xml @@ -86,6 +86,14 @@ %CPPSELF.%FUNCTION_NAME(&a, &b, &c, &d, &e); %PYARG_0 = Shiboken::makeTuple(a, b, c, d, e); </template> + <template name="read_wrapper"> + char _data[%2]; + qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %2); + if (_size > 0) + return %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size)); + else + return %CONVERTTOPYTHON[QByteArray](QByteArray()); + </template> </typesystem> |