fix non public overload order
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
15d40b2d44
commit
8b79e6a28a
3 changed files with 45 additions and 3 deletions
|
|
@ -102,8 +102,26 @@ protected:
|
|||
class GG : public G {
|
||||
};
|
||||
|
||||
template <class T>
|
||||
class HH_T
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
|
||||
HH_T(int i,int j)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
protected:
|
||||
HH_T();
|
||||
|
||||
};
|
||||
|
||||
|
||||
%}
|
||||
|
||||
|
||||
|
||||
%template(HH) HH_T<int>;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,3 +94,8 @@ except AttributeError:
|
|||
gg = dc.new_GG
|
||||
del_gg = dc.delete_GG
|
||||
|
||||
|
||||
import default_constructor
|
||||
hh = default_constructor.HH(1,1)
|
||||
print hh
|
||||
|
||||
|
|
|
|||
|
|
@ -524,6 +524,17 @@ Swig_symbol_cadd(String_or_char *name, Node *n) {
|
|||
* for namespace support, type resolution, and other issues.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
static Node*
|
||||
symbol_head(Node *n)
|
||||
{
|
||||
Node *pn = Getattr(n, "sym:previousSibling");
|
||||
while (pn) {
|
||||
n = pn;
|
||||
pn = Getattr(n, "sym:previousSibling");
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
Node *
|
||||
Swig_symbol_add(String_or_char *symname, Node *n) {
|
||||
Hash *c, *cn, *cl = 0;
|
||||
|
|
@ -710,10 +721,18 @@ Swig_symbol_add(String_or_char *symname, Node *n) {
|
|||
assert(!Getattr(n,"sym:overname"));
|
||||
Setattr(n,"sym:overname", NewStringf("__SWIG_%d", pn));
|
||||
/*Printf(stdout,"%s %s %s\n", symname, Getattr(n,"decl"), Getattr(n,"sym:overname")); */
|
||||
Setattr(cl,"sym:nextSibling",n);
|
||||
Setattr(n,"sym:previousSibling",cl);
|
||||
if (Getattr(n,"access")) {
|
||||
/* add the protected/private members at the top of the overload list*/
|
||||
Node *hl = symbol_head(cl);
|
||||
Setattr(n,"sym:nextSibling",hl);
|
||||
Setattr(hl,"sym:previousSibling",n);
|
||||
} else {
|
||||
Setattr(cl,"sym:nextSibling",n);
|
||||
Setattr(n,"sym:previousSibling",cl);
|
||||
}
|
||||
Setattr(cl,"sym:overloaded",c);
|
||||
Setattr(n,"sym:overloaded",c);
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue