diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-07-20 17:57:08 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:07:21 -0300 |
commit | c8892e123c0f4512e7ecd78b85d499b02b31e1e4 (patch) | |
tree | 986d9a434acbc825442dfcf0a0182cb282e4d9f6 /tests | |
parent | 24564c588380d5c9d55a1b4a12005996abbf60aa (diff) |
Inject code for Point.__reduce__sb-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.xml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index 4816b8246..84396c060 100644 --- a/tests/samplebinding/typesystem_sample.xml +++ b/tests/samplebinding/typesystem_sample.xml @@ -951,6 +951,17 @@ %PYARG_0 = PyString_FromFormat("<Point object at %p: (%d.%d, %d.%d)>", %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"> |