summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLauro Neto <lauro.neto@openbossa.org>2010-07-20 17:57:08 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:07:21 -0300
commitc8892e123c0f4512e7ecd78b85d499b02b31e1e4 (patch)
tree986d9a434acbc825442dfcf0a0182cb282e4d9f6
parent24564c588380d5c9d55a1b4a12005996abbf60aa (diff)
Inject code for Point.__reduce__sb-0.5.1
Reviewer: Renato Ara├║jo <renato.filho@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
-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">