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

new


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-09-30 22:10:17 +00:00
commit 656cb7ab06
15 changed files with 36 additions and 36 deletions

View file

@ -1233,7 +1233,7 @@ public:
Replaceall(tm,"$source","result");
Replaceall(tm,"$target","vresult");
if (Getattr(n, "feature:new"))
if (GetFlag(n, "feature:new"))
Replaceall(tm,"$owner", "1");
else
Replaceall(tm,"$owner", "0");
@ -1296,7 +1296,7 @@ public:
Printv(f->code,cleanup,NIL);
/* Look for any remaining cleanup. This processes the %new directive */
if (current != CONSTRUCTOR_ALLOCATE && Getattr(n, "feature:new")) {
if (current != CONSTRUCTOR_ALLOCATE && GetFlag(n, "feature:new")) {
tm = Swig_typemap_lookup_new("newfree",n,"result",0);
if (tm) {
Replaceall(tm,"$source","result");