diff options
Diffstat (limited to 'tests/samplebinding/typesystem_sample.xml')
-rw-r--r-- | tests/samplebinding/typesystem_sample.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index 25301973e..5184526e4 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -1135,6 +1135,22 @@ %PYARG_0 = Py_BuildValue("(OO)", type, args); </inject-code> </add-function> + + <modify-function signature="midpoint(const Point&, Point*)const"> + <modify-argument index="2"> + <remove-argument /> + </modify-argument> + <modify-argument index="return"> + <replace-type modified-type="Point" /> + </modify-argument> + <inject-code class="target" position="beginning"> + Point _midpoint; + // The test consists in *NOT* using the ARGUMENT_NAMES type system variable. + %CPPSELF.%FUNCTION_NAME(%1, &_midpoint); + %PYARG_0 = %CONVERTTOPYTHON[Point](_midpoint); + </inject-code> + </modify-function> + <template name="return_self"> %PYARG_0 = %PYARG_1; Py_INCREF(%PYARG_1); @@ -1182,6 +1198,21 @@ %PYARG_0 = Py_BuildValue("(OO)", type, args); </inject-code> </add-function> + + <modify-function signature="midpoint(const PointF&, PointF*)const"> + <modify-argument index="2"> + <remove-argument /> + </modify-argument> + <modify-argument index="return"> + <replace-type modified-type="PointF" /> + </modify-argument> + <inject-code class="target" position="beginning"> + PointF _midpoint; + // The test consists in using the ARGUMENT_NAMES type system variable. + %CPPSELF.%FUNCTION_NAME(%ARGUMENT_NAMES, &_midpoint); + %PYARG_0 = %CONVERTTOPYTHON[PointF](_midpoint); + </inject-code> + </modify-function> </value-type> <value-type name="Rect" /> |