aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/typesystem_templates.xml
diff options
context:
space:
mode:
authorCarlos Goncalves <mail@cgoncalves.info>2010-02-02 23:05:55 +0000
committerCarlos Goncalves <mail@cgoncalves.info>2010-02-02 23:46:11 +0000
commit71e75498f4baccc70ac785e82029417e145d3188 (patch)
tree9dd43ed2413a15fb5c2c0bbf4b2a3ca49d576d2e /PySide/typesystem_templates.xml
parent8360149dad03dc4a22e9a1af2e84de2dec8b31da (diff)
Initial QtNetwork bindings.
Diffstat (limited to 'PySide/typesystem_templates.xml')
-rw-r--r--PySide/typesystem_templates.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/PySide/typesystem_templates.xml b/PySide/typesystem_templates.xml
index b5b0f00cb..ec88ac690 100644
--- a/PySide/typesystem_templates.xml
+++ b/PySide/typesystem_templates.xml
@@ -64,5 +64,15 @@
%RETURN_TYPE retval_ = %CPPSELF.%FUNCTION_NAME(&amp;val_);
%PYARG_0 = PyTuple_Pack(2, %CONVERTTOPYTHON[%RETURN_TYPE](retval_), %CONVERTTOPYTHON[char](val_));
</template>
+
+ <template name="read_wrapper">
+ char _data[%ARGUMENT_NAMES];
+ qint64 _size = %CPPSELF.%FUNCTION_NAME(_data, %ARGUMENT_NAMES);
+ if (_size > 0)
+ return %CONVERTTOPYTHON[QByteArray](QByteArray(_data, _size));
+ else
+ return %CONVERTTOPYTHON[QByteArray](QByteArray());
+ </template>
+
</typesystem>