diff options
author | Renato Filho <renato.filho@openbossa.org> | 2010-07-19 15:43:56 -0300 |
---|---|---|
committer | Renato Filho <renato.filho@openbossa.org> | 2010-07-19 15:48:22 -0300 |
commit | 40ffc6fb370024ed7e342736d0e5d37f6b9029ac (patch) | |
tree | 598995a4a72373e2a1de2396e22ff45722107bb5 | |
parent | ce76d9fa88985aac2460ea6c528183b5a6357ea4 (diff) |
Fixed inject code to works on windows.
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r-- | tests/samplebinding/typesystem_sample.xml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/samplebinding/typesystem_sample.xml b/tests/samplebinding/typesystem_sample.xml index a4e941079..29e9e601d 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 < 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> |