unnecessary check and code simplification when emitting value type returns
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6220 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
1b90037d2e
commit
c8698b31e7
1 changed files with 5 additions and 9 deletions
|
|
@ -36,17 +36,13 @@ void emit_args(SwigType *rt, ParmList *l, Wrapper *f) {
|
||||||
|
|
||||||
/* Handle return type */
|
/* Handle return type */
|
||||||
if (rt && (SwigType_type(rt) != T_VOID)) {
|
if (rt && (SwigType_type(rt) != T_VOID)) {
|
||||||
if (!CPlusPlus || (CPlusPlus && !SwigType_isclass(rt))) {
|
SwigType *vt = 0;
|
||||||
|
vt = cplus_value_type(rt);
|
||||||
|
if (!vt) {
|
||||||
Wrapper_add_local(f,"result", SwigType_lstr(rt,"result"));
|
Wrapper_add_local(f,"result", SwigType_lstr(rt,"result"));
|
||||||
} else {
|
} else {
|
||||||
SwigType *vt = 0;
|
Wrapper_add_local(f,"result", SwigType_lstr(vt,"result"));
|
||||||
vt = cplus_value_type(rt);
|
Delete(vt);
|
||||||
if (!vt) {
|
|
||||||
Wrapper_add_local(f,"result", SwigType_lstr(rt,"result"));
|
|
||||||
} else {
|
|
||||||
Wrapper_add_local(f,"result", SwigType_lstr(vt,"result"));
|
|
||||||
Delete(vt);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue