aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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>