Fix shared_ptr of classes with private constructors and destructors.
Usually these use a custom deleter passed to the shared_ptr. This also fixes the "unref" feature when used on classes with private destructors.
This commit is contained in:
parent
e796ecaa23
commit
54e2317b24
5 changed files with 53 additions and 0 deletions
|
|
@ -371,6 +371,10 @@ static void add_symbols(Node *n) {
|
|||
if ((Cmp(Getattr(n,"storage"),"virtual") == 0) && (Cmp(Getattr(n,"value"),"0") == 0)) {
|
||||
only_csymbol = 0;
|
||||
}
|
||||
if (Cmp(nodeType(n),"destructor") == 0) {
|
||||
/* Needed for "unref" feature */
|
||||
only_csymbol = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Setattr(n,"access", "public");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue