Modify following features to work as flags, so that they can be truely set and unset:

ruby


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7574 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-09-30 23:46:15 +00:00
commit f0d9cfac38

View file

@ -970,10 +970,10 @@ public:
SwigType* baseType = SwigType_base(aType); SwigType* baseType = SwigType_base(aType);
Node* classNode = classLookup(baseType); Node* classNode = classLookup(baseType);
if (classNode && Getattr(classNode, "feature:trackobjects")) { if (classNode && GetFlag(classNode, "feature:trackobjects")) {
return true; return true;
} else { } else {
return false; return false;
} }
} }
@ -1213,9 +1213,9 @@ public:
if (action) { if (action) {
Append(action,"DATA_PTR(self) = result;\n"); Append(action,"DATA_PTR(self) = result;\n");
if (Getattr(n,"feature:trackobjects")) { if (GetFlag(n,"feature:trackobjects")) {
Append(action,"SWIG_RubyAddTracking(result, self);\n"); Append(action,"SWIG_RubyAddTracking(result, self);\n");
} }
} }
} }
emit_action(n,f); emit_action(n,f);
@ -1974,9 +1974,9 @@ public:
} }
} }
if (Getattr(n,"feature:trackobjects")) { if (GetFlag(n,"feature:trackobjects")) {
Printf(freebody, " SWIG_RubyRemoveTracking(%s);\n", Swig_cparm_name(0,0)); Printf(freebody, " SWIG_RubyRemoveTracking(%s);\n", Swig_cparm_name(0,0));
} }
Printv(freebody, "}\n\n", NIL); Printv(freebody, "}\n\n", NIL);
Printv(f_wrappers, freebody, NIL); Printv(f_wrappers, freebody, NIL);