diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2009-11-10 20:34:44 -0300 |
---|---|---|
committer | Hugo Lima <hugo.lima@openbossa.org> | 2009-11-10 20:45:04 -0200 |
commit | b8a07a9e0eca74ebdbd1d4e1537d47764f494c15 (patch) | |
tree | 337656c8c3e5d6f8dd4b4d2df71d737981a80027 | |
parent | b164e617a21654e4ac28bda4c65d16787651f49d (diff) |
Change QByteArray constructor to accept \x00 bytes
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
-rw-r--r-- | PySide/QtCore/typesystem_core.xml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml index bbf56608f..e210d527e 100644 --- a/PySide/QtCore/typesystem_core.xml +++ b/PySide/QtCore/typesystem_core.xml @@ -1254,6 +1254,13 @@ <extra-includes> <include file-name="QNoImplicitBoolCast" location="global"/> </extra-includes> + <modify-function signature="QByteArray(const char *)"> + <!-- Keep \x00 bytes passed in python strings --> + <inject-code class="target" position="beginning"> + int size = PyString_Size(pyargs[0]); + cptr = new QByteArray(cpp_arg0, size); + </inject-code> + </modify-function> <!-- removed functions --> <modify-function signature="begin()" remove="all"/> <modify-function signature="begin()const" remove="all"/> |