diff options
Diffstat (limited to 'PySide/QtGui')
-rw-r--r-- | PySide/QtGui/typesystem_gui_common.xml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/PySide/QtGui/typesystem_gui_common.xml b/PySide/QtGui/typesystem_gui_common.xml index e6dabc409..50247c3de 100644 --- a/PySide/QtGui/typesystem_gui_common.xml +++ b/PySide/QtGui/typesystem_gui_common.xml @@ -499,14 +499,14 @@ </extra-includes> <add-function signature="__reduce__" return-type="PyObject*"> <inject-code class="target" position="beginning"> - PyObject *points = PyList_New(%CPPSELF.count()); - for (int i = 0; i < %CPPSELF.count(); ++i){ + PyObject* points = PyList_New(%CPPSELF.count()); + for (int i = 0, max = %CPPSELF.count(); i < max; ++i){ int x, y; %CPPSELF.point(i, &x, &y); PyList_SET_ITEM(points, i, %CONVERTTOPYTHON[QPoint](QPoint(x, y))); } <insert-template name="reduce_code"> - <replace from="%REDUCE_FORMAT" to="(N)" /> + <replace from="%REDUCE_FORMAT" to="N" /> <replace from="%REDUCE_ARGS" to="points" /> </insert-template> </inject-code> |