summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-07-20 17:57:08 -0300
committerrenatofilho <renato.filho@openbossa.org>2010-10-11 19:23:01 -0300
commitd26ecefed858fb548d57f66028f3191b5c298453 (patch)
tree329e0279425743d366540b5dc76bc0198fdcd0ed /tests
parent8d21f82291d2a7bc38da95c938450a68c7e7da12 (diff)
downloadshiboken-0.5.1.tar.gz
shiboken-0.5.1.tar.xz
shiboken-0.5.1.zip
Inject code for Point.__reduce__0.5.1
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/samplebinding/typesystem_sample.xml11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 4816b824..84396c06 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -951,6 +951,17 @@
%PYARG_0 = PyString_FromFormat("&lt;Point object at %p: (%d.%d, %d.%d)&gt;", %CPPSELF, x1, x2, y1, y2);
</inject-code>
</add-function>
+
+ <add-function signature="__reduce__" return-type="PyObject*">
+ <inject-code class="target" position="beginning">
+ PyObject *type = PyObject_Type(%PYSELF);
+ PyObject *args = NULL;
+
+ args = Py_BuildValue("(dd)", %CPPSELF.x(), %CPPSELF.y());
+
+ %PYARG_0 = Py_BuildValue("(OO)", type, args);
+ </inject-code>
+ </add-function>
</value-type>
<value-type name="Polygon">