aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRenato Filho <renato.filho@openbossa.org>2010-07-19 15:43:56 -0300
committerRenato Filho <renato.filho@openbossa.org>2010-07-19 15:48:22 -0300
commit40ffc6fb370024ed7e342736d0e5d37f6b9029ac (patch)
tree598995a4a72373e2a1de2396e22ff45722107bb5 /tests
parentce76d9fa88985aac2460ea6c528183b5a6357ea4 (diff)
Fixed inject code to works on windows.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org> Luciano Wolf <luciano.wolf@openbossa.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/samplebinding/typesystem_sample.xml3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml
index a4e94107..29e9e601 100644
--- a/tests/samplebinding/typesystem_sample.xml
+++ b/tests/samplebinding/typesystem_sample.xml
@@ -773,10 +773,11 @@
</modify-argument>
<inject-code class="target" position="beginning">
int numItems = PySequence_Size(%PYARG_1);
- int cppItems[numItems];
+ int *cppItems = new int[numItems];
for (int i = 0; i &lt; numItems; i++)
cppItems[i] = %CONVERTTOCPP[int](PySequence_GetItem(%PYARG_1, i));
%PYARG_0 = %CONVERTTOPYTHON[int](%CPPSELF.%FUNCTION_NAME(numItems, cppItems));
+ delete[] cppItems;
</inject-code>
</modify-function>