SWIG_RubyAddTracking and SWIG_RubyRemoveTracking were not being correctly generated since they were looking for featue:trackobjects on the constructor/destructor nodes as opposed to the class node.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8338 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
fa80ef5608
commit
e6814c1841
1 changed files with 9 additions and 4 deletions
|
|
@ -1140,7 +1140,7 @@ public:
|
||||||
}
|
}
|
||||||
if (action) {
|
if (action) {
|
||||||
Append(action,"DATA_PTR(self) = result;\n");
|
Append(action,"DATA_PTR(self) = result;\n");
|
||||||
if (GetFlag(n,"feature:trackobjects")) {
|
if (GetFlag(pn,"feature:trackobjects")) {
|
||||||
Append(action,"SWIG_RubyAddTracking(result, self);\n");
|
Append(action,"SWIG_RubyAddTracking(result, self);\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1947,6 +1947,14 @@ public:
|
||||||
freefunc, "(", klass->type, " *", pname0, ") {\n",
|
freefunc, "(", klass->type, " *", pname0, ") {\n",
|
||||||
tab4, NIL);
|
tab4, NIL);
|
||||||
|
|
||||||
|
/* Check to see if object tracking is activated for the class
|
||||||
|
that owns this destructor. */
|
||||||
|
Node *pn = Swig_methodclass(n);
|
||||||
|
if (GetFlag(pn,"feature:trackobjects")) {
|
||||||
|
Printf(freebody, "SWIG_RubyRemoveTracking(%s);\n", pname0);
|
||||||
|
Printv(freebody, tab4, NIL);
|
||||||
|
}
|
||||||
|
|
||||||
if (Extend) {
|
if (Extend) {
|
||||||
String *wrap = Getattr(n, "wrap:code");
|
String *wrap = Getattr(n, "wrap:code");
|
||||||
if (wrap) {
|
if (wrap) {
|
||||||
|
|
@ -1967,9 +1975,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GetFlag(n,"feature:trackobjects")) {
|
|
||||||
Printf(freebody, " SWIG_RubyRemoveTracking(%s);\n", pname0);
|
|
||||||
}
|
|
||||||
Printv(freebody, "}\n\n", NIL);
|
Printv(freebody, "}\n\n", NIL);
|
||||||
|
|
||||||
Printv(f_wrappers, freebody, NIL);
|
Printv(f_wrappers, freebody, NIL);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue