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
|
|
@ -941,7 +941,7 @@ int Swig_MethodToFunction(Node *n, const_String_or_char_ptr nspace, String *clas
|
|||
is_smart_pointer_overload = 1;
|
||||
}
|
||||
else if (Swig_storage_isstatic(n)) {
|
||||
String *cname = Getattr(n, "classname") ? Getattr(n, "classname") : classname;
|
||||
String *cname = Getattr(n, "extendsmartclassname") ? Getattr(n, "extendsmartclassname") : classname;
|
||||
String *ctname = SwigType_namestr(cname);
|
||||
self = NewStringf("(*(%s const *)this)->", ctname);
|
||||
is_smart_pointer_overload = 1;
|
||||
|
|
@ -1058,7 +1058,7 @@ int Swig_MethodToFunction(Node *n, const_String_or_char_ptr nspace, String *clas
|
|||
|
||||
String *defaultargs = Getattr(n, "defaultargs");
|
||||
String *code = Getattr(n, "code");
|
||||
String *cname = Getattr(n, "classname") ? Getattr(n, "classname") : classname;
|
||||
String *cname = Getattr(n, "extendsmartclassname") ? Getattr(n, "extendsmartclassname") : classname;
|
||||
String *membername = Swig_name_member(nspace, cname, name);
|
||||
String *mangled = Swig_name_mangle(membername);
|
||||
int is_smart_pointer = flags & CWRAP_SMART_POINTER;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue