Fix wrapping of function pointers and member function pointers when the function returns by reference
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12157 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
2d8b51684d
commit
568607c5ea
7 changed files with 67 additions and 4 deletions
|
|
@ -735,6 +735,7 @@ String *SwigType_rcaststr(SwigType *s, const_String_or_char_ptr name) {
|
|||
int clear = 1;
|
||||
int firstarray = 1;
|
||||
int isreference = 0;
|
||||
int isfunction = 0;
|
||||
int isarray = 0;
|
||||
|
||||
result = NewStringEmpty();
|
||||
|
|
@ -835,6 +836,7 @@ String *SwigType_rcaststr(SwigType *s, const_String_or_char_ptr name) {
|
|||
}
|
||||
Append(result, ")");
|
||||
Delete(parms);
|
||||
isfunction = 1;
|
||||
} else {
|
||||
String *bs = SwigType_namestr(element);
|
||||
Insert(result, 0, " ");
|
||||
|
|
@ -850,10 +852,12 @@ String *SwigType_rcaststr(SwigType *s, const_String_or_char_ptr name) {
|
|||
cast = NewStringf("(%s)", result);
|
||||
}
|
||||
if (name) {
|
||||
if (isreference) {
|
||||
if (isarray)
|
||||
Clear(cast);
|
||||
Append(cast, "*");
|
||||
if (!isfunction) {
|
||||
if (isreference) {
|
||||
if (isarray)
|
||||
Clear(cast);
|
||||
Append(cast, "*");
|
||||
}
|
||||
}
|
||||
Append(cast, name);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue