Tcl: change differently named constructors behaviour.
Where overloaded constructors are given different names, a class is constructed by calling
the name of the first constructor wrapper parsed rather than the last one parsed.
Behaviour is not perfect as either name could be used, it is just consistent with Python.
Fixes Examples/tcl/operator example - broken in 0e57357472
This commit is contained in:
parent
3489d0db32
commit
695de9ee0e
1 changed files with 3 additions and 1 deletions
|
|
@ -744,6 +744,7 @@ public:
|
|||
have_constructor = 0;
|
||||
have_destructor = 0;
|
||||
destructor_action = 0;
|
||||
constructor_name = 0;
|
||||
|
||||
if (itcl) {
|
||||
constructor = NewString("");
|
||||
|
|
@ -1202,7 +1203,8 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
constructor_name = NewString(Getattr(n, "sym:name"));
|
||||
if (!have_constructor)
|
||||
constructor_name = NewString(Getattr(n, "sym:name"));
|
||||
have_constructor = 1;
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue