From a230b243d0e24c00a2731468ee6f2e1a3d34bd5e Mon Sep 17 00:00:00 2001 From: Hugo Parente Lima Date: Wed, 13 Apr 2011 16:02:54 -0300 Subject: [PATCH] Fix inject code of QByteArray::fromRawData. The QByteArray returned must share, nto copy, the string contents. --- PySide/QtCore/typesystem_core.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index 60001e5..a2f1ee5 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1699,8 +1699,7 @@ - // %FUNCTION_NAME() - avoid generation of default function call - %PYARG_0 = %CONVERTTOPYTHON[QByteArray](QByteArray(%1)); + %PYARG_0 = %CONVERTTOPYTHON[QByteArray](%CPPSELF.%FUNCTION_NAME(PyString_AS_STRING(%PYARG_1), PyString_GET_SIZE(%PYARG_1)));