Fix std::map and smart pointers.
Fixes problem with method overloading when some methods are added by %extend and others are real methods and using template default parameters with smart pointers. This is noticeable as a regression since 2.0.12 when using the default smart pointer handling for some languages when the smart pointer wraps std::map and other STL containers. Fixes SF Bug 1363
This commit is contained in:
parent
c99417ab13
commit
dbf44fc181
6 changed files with 70 additions and 7 deletions
|
|
@ -1242,8 +1242,8 @@ int Language::memberfunctionHandler(Node *n) {
|
|||
|
||||
String *fname = Swig_name_member(NSpace, ClassPrefix, symname);
|
||||
if (Extend && SmartPointer) {
|
||||
if (!Getattr(n, "classname")) {
|
||||
Setattr(n, "classname", Getattr(CurrentClass, "allocate:smartpointerbase"));
|
||||
if (!Getattr(n, "extendsmartclassname")) {
|
||||
Setattr(n, "extendsmartclassname", Getattr(CurrentClass, "allocate:smartpointerpointeeclassname"));
|
||||
}
|
||||
}
|
||||
// Set up the type for the cast to this class for use when wrapping const director (virtual) methods.
|
||||
|
|
@ -1562,7 +1562,7 @@ int Language::membervariableHandler(Node *n) {
|
|||
int Language::staticmembervariableHandler(Node *n) {
|
||||
Swig_require("staticmembervariableHandler", n, "*name", "*sym:name", "*type", "?value", NIL);
|
||||
String *value = Getattr(n, "value");
|
||||
String *classname = !SmartPointer ? (isNonVirtualProtectedAccess(n) ? DirectorClassName : ClassName) : Getattr(CurrentClass, "allocate:smartpointerbase");
|
||||
String *classname = !SmartPointer ? (isNonVirtualProtectedAccess(n) ? DirectorClassName : ClassName) : Getattr(CurrentClass, "allocate:smartpointerpointeeclassname");
|
||||
|
||||
if (!value || !Getattr(n, "hasconsttype")) {
|
||||
String *name = Getattr(n, "name");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue