missing fixes for nodirector methods, already fixed in python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6640 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
709cc0bd34
commit
8aaf75a78e
2 changed files with 7 additions and 4 deletions
|
|
@ -466,6 +466,7 @@ public:
|
|||
int newobj = Getattr(n,"feature:new") ? 1 : 0;
|
||||
String *nodeType = Getattr(n, "nodeType");
|
||||
int constructor = !Cmp(nodeType, "constructor");
|
||||
int destructor = (!Cmp(nodeType, "destructor"));
|
||||
String *storage = Getattr(n,"storage");
|
||||
int isVirtual = !Cmp(storage,"virtual");
|
||||
String *overname = 0;
|
||||
|
|
@ -686,9 +687,10 @@ public:
|
|||
// (the smart-pointer) and the director object (the "pointee") are
|
||||
// distinct.
|
||||
|
||||
if (CPlusPlus && directorsEnabled()) {
|
||||
if (!is_smart_pointer()) {
|
||||
if (/*directorbase &&*/ !constructor && isVirtual) {
|
||||
if (directorsEnabled()) {
|
||||
if (!is_smart_pointer()) {
|
||||
if (/*directorbase &&*/ !constructor && !destructor
|
||||
&& isVirtual && !Getattr(n,"feature:nodirector")) {
|
||||
Wrapper_add_local(f, "director", "Swig::Director *director = 0");
|
||||
Printf(f->code, "director = dynamic_cast<Swig::Director *>(arg1);\n");
|
||||
|
||||
|
|
|
|||
|
|
@ -1076,7 +1076,8 @@ public:
|
|||
|
||||
if (directorsEnabled()) {
|
||||
if (!is_smart_pointer()) {
|
||||
if (/*directorbase &&*/ !constructor && !destructor && isVirtual) {
|
||||
if (/*directorbase &&*/ !constructor && !destructor
|
||||
&& isVirtual && !Getattr(n,"feature:nodirector")) {
|
||||
Wrapper_add_local(f, "director", "Swig::Director *director = 0");
|
||||
Printf(f->code, "director = dynamic_cast<Swig::Director *>(arg1);\n");
|
||||
Printf(f->code, "if (director && (director->swig_get_self() == self)) director->swig_set_up();\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue