Apply patch #3066958 from Mikael Johansson to fix default smart pointer handling when the smart pointer contains both a const and non-const operator->.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
766ed8db37
commit
3219746776
9 changed files with 343 additions and 12 deletions
|
|
@ -824,9 +824,12 @@ Allocate():
|
|||
int isconst = 0;
|
||||
Delete(SwigType_pop(type));
|
||||
if (SwigType_isconst(type)) {
|
||||
isconst = 1;
|
||||
isconst = !Getattr(inclass, "allocate:smartpointermutable");
|
||||
Setattr(inclass, "allocate:smartpointerconst", "1");
|
||||
}
|
||||
else {
|
||||
Setattr(inclass, "allocate:smartpointermutable", "1");
|
||||
}
|
||||
List *methods = smart_pointer_methods(sc, 0, isconst);
|
||||
Setattr(inclass, "allocate:smartpointer", methods);
|
||||
Setattr(inclass, "allocate:smartpointerbase", base);
|
||||
|
|
@ -834,7 +837,6 @@ Allocate():
|
|||
/* Hmmm. The return value is not a pointer. If the type is a value
|
||||
or reference. We're going to chase it to see if another operator->()
|
||||
can be found */
|
||||
|
||||
if ((SwigType_check_decl(type, "")) || (SwigType_check_decl(type, "r."))) {
|
||||
Node *nn = Swig_symbol_clookup((char *) "operator ->", Getattr(sc, "symtab"));
|
||||
if (nn) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue