summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2010-10-29 16:31:33 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2010-10-29 17:25:18 -0200
commita53c92a42b29e0c49d28e0cf53f33b9515d78622 (patch)
tree5502143a76cde9789743c3b64b6d5bffc5dd07c1
parentd09decc37b49ca19593131c7fb59486d5cfb1c33 (diff)
downloadshiboken-a53c92a42b29e0c49d28e0cf53f33b9515d78622.tar.gz
shiboken-a53c92a42b29e0c49d28e0cf53f33b9515d78622.tar.xz
shiboken-a53c92a42b29e0c49d28e0cf53f33b9515d78622.zip
Fix injectcode test to work with the newer version of sequencetoArgcArgv.
-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>