diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2010-07-20 17:57:08 -0300 |
---|---|---|
committer | renatofilho <renato.filho@openbossa.org> | 2010-10-11 19:23:01 -0300 |
commit | d26ecefed858fb548d57f66028f3191b5c298453 (patch) | |
tree | 329e0279425743d366540b5dc76bc0198fdcd0ed | |
parent | 8d21f82291d2a7bc38da95c938450a68c7e7da12 (diff) | |
download | shiboken-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>
-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 4816b824..84396c06 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"> |