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