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@5433 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-11-28 19:06:35 +00:00
commit 7d38c269be

View file

@ -603,6 +603,7 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
int clear = 1;
int firstarray = 1;
int isreference = 0;
int isarray = 0;
result = NewString("");
@ -684,6 +685,7 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
Delete(size);
clear = 0;
}
isarray = 1;
} else if (SwigType_isfunction(element)) {
DOH *parms, *p;
int j, plen;
@ -718,6 +720,7 @@ String *SwigType_rcaststr(SwigType *s, const String_or_char *name) {
}
if (name) {
if (isreference) {
if (isarray) Clear(cast);
Append(cast,"*");
}
Append(cast,name);