fix for non-void returning value and using + %extend
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9078778009
commit
f3a2a4f0ee
1 changed files with 5 additions and 1 deletions
|
|
@ -855,10 +855,14 @@ class TypePass : private Dispatcher {
|
|||
|
||||
if (!GetFlag(nn,"feature:ignore")) {
|
||||
ParmList *parms = CopyParmList(Getattr(c,"parms"));
|
||||
int is_pointer = SwigType_ispointer_return(Getattr(nn,"decl"));
|
||||
int is_void = checkAttribute(nn,"type", "void") && !is_pointer;
|
||||
Setattr(nn,"parms",parms);
|
||||
Delete(parms);
|
||||
if (Getattr(n,"feature:extend")) {
|
||||
String *ucode = NewStringf("{ self->%s(",Getattr(n,"uname"));
|
||||
String *ucode = is_void ? NewStringf("{ self->%s(",Getattr(n,"uname")) :
|
||||
NewStringf("{ return self->%s(",Getattr(n,"uname"));
|
||||
|
||||
for (ParmList *p = parms; p;) {
|
||||
StringAppend(ucode,HashGetAttr(p,k_name));
|
||||
p = nextSibling(p);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue