Store the complete return type for director methods. Over time, the director code can migrate to using the new "returntype" attribute rather than each language module calculating it themselves.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6798 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ef77bc5ad0
commit
ea8fe73ab8
1 changed files with 13 additions and 3 deletions
|
|
@ -1514,9 +1514,6 @@ int Language::classDirectorDefaultConstructor(Node *n) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* ----------------------------------------------------------------------
|
|
||||||
* Language::unrollVirtualMethods()
|
|
||||||
* ---------------------------------------------------------------------- */
|
|
||||||
static
|
static
|
||||||
String *vtable_method_id(Node *n)
|
String *vtable_method_id(Node *n)
|
||||||
{
|
{
|
||||||
|
|
@ -1532,6 +1529,9 @@ String *vtable_method_id(Node *n)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ----------------------------------------------------------------------
|
||||||
|
* Language::unrollVirtualMethods()
|
||||||
|
* ---------------------------------------------------------------------- */
|
||||||
int Language::unrollVirtualMethods(Node *n,
|
int Language::unrollVirtualMethods(Node *n,
|
||||||
Node *parent,
|
Node *parent,
|
||||||
Hash *vm,
|
Hash *vm,
|
||||||
|
|
@ -1594,6 +1594,16 @@ int Language::unrollVirtualMethods(Node *n,
|
||||||
Hash *item = NewHash();
|
Hash *item = NewHash();
|
||||||
Setattr(item, "fqName", fqname);
|
Setattr(item, "fqName", fqname);
|
||||||
Node *m = Copy(ni);
|
Node *m = Copy(ni);
|
||||||
|
|
||||||
|
/* Store the complete return type - needed for non-simple return types (pointers, references etc.) */
|
||||||
|
SwigType *ty = NewString(Getattr(m,"type"));
|
||||||
|
SwigType_push(ty,decl);
|
||||||
|
if (SwigType_isqualifier(ty)) {
|
||||||
|
SwigType_pop(ty);
|
||||||
|
}
|
||||||
|
Delete(SwigType_pop_function(ty));
|
||||||
|
Setattr(m,"returntype", ty);
|
||||||
|
|
||||||
String *mname = NewStringf("%s::%s", Getattr(parent,"name"),name);
|
String *mname = NewStringf("%s::%s", Getattr(parent,"name"),name);
|
||||||
/* apply the features of the original method found in the base class */
|
/* apply the features of the original method found in the base class */
|
||||||
Swig_features_get(Swig_cparse_features(), 0, mname, Getattr(m,"decl"), m);
|
Swig_features_get(Swig_cparse_features(), 0, mname, Getattr(m,"decl"), m);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue