summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/libsample/injectcode.cpp2
-rw-r--r--tests/samplebinding/typesystem_sample.xml8
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/libsample/injectcode.cpp b/tests/libsample/injectcode.cpp
index 05c4a143..6e19de75 100644
--- a/tests/libsample/injectcode.cpp
+++ b/tests/libsample/injectcode.cpp
@@ -54,7 +54,7 @@ const char* InjectCode::simpleMethod2()
const char* InjectCode::simpleMethod3(int argc, char** argv)
{
- for (int i = 0; i < argc; ++i)
+ for (int i = 1; i < argc; ++i)
m_valueHolder += argv[i];
return m_valueHolder.c_str();
}
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index 60e7e22c..ff367f4c 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -914,7 +914,7 @@
<inject-code class="target" position="beginning">
int argc;
char** argv;
- if (!PySequenceToArgcArgv(%PYARG_1, &amp;argc, &amp;argv)) {
+ if (!sequenceToArgcArgv(%PYARG_1, &amp;argc, &amp;argv)) {
PyErr_SetString(PyExc_TypeError, "error");
return 0;
}
@@ -922,7 +922,7 @@
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](foo);
for (int i = 0; i &lt; argc; ++i)
- delete[] argv[i];
+ free(argv[i]);
delete[] argv;
</inject-code>
</modify-function>
@@ -938,7 +938,7 @@
<inject-code class="target" position="beginning">
int argc;
char** argv;
- if (!PySequenceToArgcArgv(%PYARG_1, &amp;argc, &amp;argv)) {
+ if (!sequenceToArgcArgv(%PYARG_1, &amp;argc, &amp;argv)) {
PyErr_SetString(PyExc_TypeError, "error");
return 0;
}
@@ -946,7 +946,7 @@
%PYARG_0 = %CONVERTTOPYTHON[%RETURN_TYPE](foo);
for (int i = 0; i &lt; argc; ++i)
- delete[] argv[i];
+ free(argv[i]);
delete[] argv;
</inject-code>
</modify-function>