aboutsummaryrefslogtreecommitdiffstats
path: root/tests/samplebinding
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-09-20 19:32:38 -0300
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:17:15 -0300
commit5d6f2193395afab85e444b61761484197d45a93c (patch)
treec8f56441aca76b2b076083b5c6bb3c89477fca15 /tests/samplebinding
parenta2d5bb825977e1f7952a89c64ed2e6e307ae1f78 (diff)
Added SBK_PyString_FromCString and SBK_PyString_FromFormat as helper macro for Py3k port.
Diffstat (limited to 'tests/samplebinding')
-rw-r--r--tests/samplebinding/typesystem_sample.xml6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 1dae83e2d..a2b041a41 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -1219,7 +1219,7 @@
int x2 = ((int) (%CPPSELF.x() * 100)) - (x1 * 100);
int y1 = (int) %CPPSELF.y();
int y2 = ((int) (%CPPSELF.y() * 100)) - (y1 * 100);
- %PYARG_0 = PyBytes_FromFormat("Point(%d.%d, %d.%d)", x1, x2, y1, y2);
+ %PYARG_0 = SBK_PyString_FromFormat("Point(%d.%d, %d.%d)", x1, x2, y1, y2);
</inject-code>
</add-function>
<add-function signature="__repr__" return-type="PyObject*">
@@ -1228,7 +1228,7 @@
int x2 = ((int) (%CPPSELF.x() * 10)) - (x1 * 10);
int y1 = (int) %CPPSELF.y();
int y2 = ((int) (%CPPSELF.y() * 10)) - (y1 * 10);
- %PYARG_0 = PyBytes_FromFormat("&lt;Point object at %p: (%d.%d, %d.%d)&gt;", %CPPSELF, x1, x2, y1, y2);
+ %PYARG_0 = SBK_PyString_FromFormat("&lt;Point object at %p: (%d.%d, %d.%d)&gt;", %CPPSELF, x1, x2, y1, y2);
</inject-code>
</add-function>
@@ -1482,7 +1482,7 @@
<value-type name="Str" hash-function="strHash">
<add-function signature="__str__" return-type="PyObject*">
<inject-code class="target" position="beginning">
- %PYARG_0 = PyBytes_FromString(%CPPSELF.cstring());
+ %PYARG_0 = SBK_PyString_FromCString(%CPPSELF.cstring());
</inject-code>
</add-function>
<add-function signature="__len__" >