Fixed casting problem with references to arrays in gcc-3.3 (and maybe other versions).
I'm not sure if this is a gcc bug or a SWIG bug. However, the patch makes the arrayref.i test work on my machine. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f829c8643c
commit
d62e0c9800
1 changed files with 3 additions and 0 deletions
|
|
@ -603,6 +603,7 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
|
||||||
int clear = 1;
|
int clear = 1;
|
||||||
int firstarray = 1;
|
int firstarray = 1;
|
||||||
int isreference = 0;
|
int isreference = 0;
|
||||||
|
int isarray = 0;
|
||||||
|
|
||||||
result = NewString("");
|
result = NewString("");
|
||||||
|
|
||||||
|
|
@ -684,6 +685,7 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
|
||||||
Delete(size);
|
Delete(size);
|
||||||
clear = 0;
|
clear = 0;
|
||||||
}
|
}
|
||||||
|
isarray = 1;
|
||||||
} else if (SwigType_isfunction(element)) {
|
} else if (SwigType_isfunction(element)) {
|
||||||
DOH *parms, *p;
|
DOH *parms, *p;
|
||||||
int j, plen;
|
int j, plen;
|
||||||
|
|
@ -718,6 +720,7 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
|
||||||
}
|
}
|
||||||
if (name) {
|
if (name) {
|
||||||
if (isreference) {
|
if (isreference) {
|
||||||
|
if (isarray) Clear(cast);
|
||||||
Append(cast,"*");
|
Append(cast,"*");
|
||||||
}
|
}
|
||||||
Append(cast,name);
|
Append(cast,name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue