aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-10-23 14:58:40 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-10-23 14:58:40 -0300
commit1cd1d0c57ea6b608063fc91f1e3d7e9731324ace (patch)
tree1a7ff930b89b397fac8296f9070733bb0a38bc24 /tests
parentd43b3d4c08ed35eaf5c4a32043c83382bd00fbd0 (diff)
renamed template variable %SELF to %PYSELF and %CPPOBJ to %CPPSELF
to improve code readability; also fixed usage of template variables on type system for the test bindings
Diffstat (limited to 'tests')
-rw-r--r--tests/samplebinding/simplefile_glue.cpp4
-rw-r--r--tests/samplebinding/typesystem_sample.xml6
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/samplebinding/simplefile_glue.cpp b/tests/samplebinding/simplefile_glue.cpp
index b055ce267..0e32acde7 100644
--- a/tests/samplebinding/simplefile_glue.cpp
+++ b/tests/samplebinding/simplefile_glue.cpp
@@ -1,7 +1,7 @@
// native ending
-if (%0 == Py_False) {
+if (!%CPPSELF.open()) {
PyObject* error_msg = PyString_FromFormat(
- "Could not open file: \"%s\"", %CPPOBJ->filename());
+ "Could not open file: \"%s\"", %CPPSELF->filename());
PyErr_SetObject(PyExc_IOError, error_msg);
return 0;
}
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index f932d7c23..6055f9c48 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -57,14 +57,14 @@
<template name="boolptr_at_end_fix_beginning">
bool __ok__;
%0 = Shiboken::Converter&lt; %RETURN_TYPE &gt;::toPython(
- %SELF.%TYPE::%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;__ok__)
+ %CPPSELF.%TYPE::%FUNCTION_NAME(%ARGUMENT_NAMES, &amp;__ok__)
);
</template>
<template name="boolptr_at_start_fix_beginning">
bool __ok__;
%0 = Shiboken::Converter&lt; %RETURN_TYPE &gt;::toPython(
- %SELF.%TYPE::%FUNCTION_NAME(&amp;__ok__, %ARGUMENT_NAMES)
+ %CPPSELF.%TYPE::%FUNCTION_NAME(&amp;__ok__, %ARGUMENT_NAMES)
);
</template>
@@ -85,7 +85,7 @@
</modify-argument>
<inject-code class="native" position="beginning">
%0 = Shiboken::Converter&lt; %RETURN_TYPE &gt;::toPython(
- %SELF.%TYPE::%FUNCTION_NAME(%1, true, %3, %4)
+ %CPPSELF.%TYPE::%FUNCTION_NAME(%1, true, %3, %4)
);
</inject-code>
</modify-function>