Fixed weird const and return-by-value problem.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@915 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
8b5f757406
commit
391cabbb00
1 changed files with 8 additions and 1 deletions
|
|
@ -238,7 +238,14 @@ void Swig_cppresult(Wrapper *w, SwigType *t, String_or_char *name, String_or_cha
|
|||
case T_VOID:
|
||||
break;
|
||||
case T_USER:
|
||||
Printf(fcall, "%s = new %s(", name, SwigType_str(t,0));
|
||||
{
|
||||
SwigType *temp = Copy(t);
|
||||
while (SwigType_isconst(temp)) {
|
||||
SwigType_pop(temp);
|
||||
}
|
||||
Printf(fcall, "%s = new %s(", name, SwigType_str(temp,0));
|
||||
Delete(temp);
|
||||
}
|
||||
break;
|
||||
case T_REFERENCE:
|
||||
Printf(fcall, "%s = ", SwigType_str(t,"_result_ref"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue