Updated QtNetwork's type system.

This commit is contained in:
Marcelo Lira 2011-08-18 14:34:21 -03:00 • committed by Hugo Parente Lima
commit 69d0627af3

View file

@ -239,11 +239,11 @@
PyErr_SetString(PyExc_IndexError, "index out of bounds"); PyErr_SetString(PyExc_IndexError, "index out of bounds");
return 0; return 0;
} }
if (_i < 0) if (_i < 0)
_i = 16 - qAbs(_i); _i = 16 - qAbs(_i);
return %CONVERTTOPYTHON[uint](%CPPSELF->c[_i]); uint item = %CPPSELF.c[_i];
return %CONVERTTOPYTHON[uint](item);
</inject-code> </inject-code>
</add-function> </add-function>
<add-function signature="__len__"> <add-function signature="__len__">
@ -257,12 +257,10 @@
PyErr_SetString(PyExc_IndexError, "index out of bounds"); PyErr_SetString(PyExc_IndexError, "index out of bounds");
return -1; return -1;
} }
if (_i &lt; 0) if (_i &lt; 0)
_i = 16 - qAbs(_i); _i = 16 - qAbs(_i);
quint8 item = %CONVERTTOCPP[quint8](_value);
%CPPSELF->c[_i] = %CONVERTTOCPP[quint8](_value); %CPPSELF.c[_i] = item;
return 0; return 0;
</inject-code> </inject-code>
</add-function> </add-function>