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

predicate


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7576 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-09-30 23:51:11 +00:00
commit bc2a59ee9d

View file

@ -1099,7 +1099,7 @@ public:
Wrapper *f = NewWrapper();
/* Rename predicate methods */
if (Getattr(n, "feature:predicate")) {
if (GetFlag(n, "feature:predicate")) {
Append(symname, "?");
}
@ -1224,7 +1224,7 @@ public:
/* Return value if necessary */
if (SwigType_type(t) != T_VOID && current != CONSTRUCTOR_ALLOCATE && current != CONSTRUCTOR_INITIALIZE) {
need_result = 1;
if (Getattr(n, "feature:predicate")) {
if (GetFlag(n, "feature:predicate")) {
Printv(f->code, tab4, "vresult = (result ? Qtrue : Qfalse);\n", NIL);
} else {
tm = Swig_typemap_lookup_new("out",n,"result",0);