Fixed array deletion problem.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@497 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
7242c6daf7
commit
e41edc6944
1 changed files with 4 additions and 4 deletions
|
|
@ -73,7 +73,7 @@ onto the C 'int' datatype.
|
|||
static void int_destroy(int *array) {
|
||||
if (array) {
|
||||
#ifdef __cplusplus
|
||||
delete array [];
|
||||
delete [] array;
|
||||
#else
|
||||
free(array);
|
||||
#endif
|
||||
|
|
@ -142,7 +142,7 @@ int int_set(int *array, int index, int value);
|
|||
static void float_destroy(float *array) {
|
||||
if (array) {
|
||||
#ifdef __cplusplus
|
||||
delete array [];
|
||||
delete [] array;
|
||||
#else
|
||||
free(array);
|
||||
#endif
|
||||
|
|
@ -184,7 +184,7 @@ int int_set(int *array, int index, int value);
|
|||
static void double_destroy(double *array) {
|
||||
if (array) {
|
||||
#ifdef __cplusplus
|
||||
delete array [];
|
||||
delete [] array;
|
||||
#else
|
||||
free(array);
|
||||
#endif
|
||||
|
|
@ -328,7 +328,7 @@ static void string_destroy(char **array) {
|
|||
i++;
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
delete array [];
|
||||
delete [] array;
|
||||
#else
|
||||
free(array);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue