aboutsummaryrefslogtreecommitdiffstats
path: root/PySide/QtOpenGL
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2011-08-04 19:46:25 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:56:18 -0300
commit8c1fbc37515715936a90c858352fb9c3d301b1f8 (patch)
tree5c2934de7acc54432f415e5ab1fd22ec19349004 /PySide/QtOpenGL
parentad8992e9e06735265745decebbf6f2406d37e74d (diff)
Signature of various added and modified functions modified to use non-const references.
The API Extractor signature normalizer removes const& from argument types, but it leaves non-const references unchanged.
Diffstat (limited to 'PySide/QtOpenGL')
-rw-r--r--PySide/QtOpenGL/typesystem_opengl.xml12
1 files changed, 4 insertions, 8 deletions
diff --git a/PySide/QtOpenGL/typesystem_opengl.xml b/PySide/QtOpenGL/typesystem_opengl.xml
index 0a1579cfa..043b2f565 100644
--- a/PySide/QtOpenGL/typesystem_opengl.xml
+++ b/PySide/QtOpenGL/typesystem_opengl.xml
@@ -657,15 +657,13 @@
<enum-type name="UsagePattern" since="4.7"/>
<modify-function signature="allocate(const void*, int)">
<modify-argument index="1">
- <replace-type modified-type="const QByteArray&amp;"/>
+ <replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
<modify-argument index="2">
<replace-default-expression with="-1"/>
</modify-argument>
<inject-code class="target" position="beginning">
- int size = %2;
- if (size &lt; 0)
- size = %1.size();
+ int size = (%2 &lt; 0) ? %1.size() : %2;
%CPPSELF.allocate((const void*) %1.data(), size);
</inject-code>
</modify-function>
@@ -703,15 +701,13 @@
</modify-function>
<modify-function signature="write(int, const void*, int)">
<modify-argument index="2">
- <replace-type modified-type="const QByteArray&amp;"/>
+ <replace-type modified-type="QByteArray&amp;"/>
</modify-argument>
<modify-argument index="3">
<replace-default-expression with="-1"/>
</modify-argument>
<inject-code class="target" position="beginning">
- int size = %3;
- if (size &lt; 0)
- size = %2.size();
+ int size = (%3 &lt; 0) ? %2.size() : %3;
%CPPSELF.write(%1, (const void*) %2.data(), size);
</inject-code>
</modify-function>