aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtCore/typesystem_core.xml
diff options
context:
space:
mode:
Diffstat (limited to 'PySide/QtCore/typesystem_core.xml')
-rw-r--r--PySide/QtCore/typesystem_core.xml21
1 files changed, 16 insertions, 5 deletions
diff --git a/PySide/QtCore/typesystem_core.xml b/PySide/QtCore/typesystem_core.xml
index d11d196fe..4a7456bd3 100644
--- a/PySide/QtCore/typesystem_core.xml
+++ b/PySide/QtCore/typesystem_core.xml
@@ -1782,11 +1782,22 @@
<extra-includes>
<include file-name="QAbstractFileEngine" location="global"/>
</extra-includes>
- <!-- ### See bug 721 -->
- <modify-function signature="unmap(uchar*)" remove="all"/>
- <modify-function signature="map(qint64,qint64,QFile::MemoryMapFlags)" remove="all"/>
- <!-- ### -->
-
+ <modify-function signature="unmap(uchar*)">
+ <modify-argument index="1">
+ <replace-type modified-type="PyBuffer"/>
+ </modify-argument>
+ <inject-code>
+ const void* ptr;
+ Py_ssize_t len;
+ PyObject_AsReadBuffer(%PYARG_1, &amp;ptr, &amp;len);
+ %PYARG_0 = %CONVERTTOPYTHON[bool](%CPPSELF.%FUNCTION_NAME((uchar*)ptr));
+ </inject-code>
+ </modify-function>
+ <modify-function signature="map(qint64,qint64,QFile::MemoryMapFlags)">
+ <inject-code>
+ %PYARG_0 = PyBuffer_FromReadWriteMemory(%CPPSELF.%FUNCTION_NAME(%1, %2, %3), %2);
+ </inject-code>
+ </modify-function>
<modify-function signature="remove()" allow-thread="yes"/>
<modify-function signature="remove(const QString&amp;)" allow-thread="yes"/>
<modify-function signature="rename(const QString&amp;)" allow-thread="yes"/>