From dda5e32a1892af2139edfdc7254179e13e82da9d Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 4 Oct 2005 20:34:10 +0000 Subject: [PATCH] Modify following features to work as flags, so that they can be truely set and unset: nounref, noref, noattr git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7586 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Swig/cwrap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Swig/cwrap.c b/Source/Swig/cwrap.c index e73257610..725086342 100644 --- a/Source/Swig/cwrap.c +++ b/Source/Swig/cwrap.c @@ -517,7 +517,7 @@ Swig_cattr_search(Node *n, const String *attr, const String *noattr) { String *f = 0; n = Swig_methodclass(n); - if (Getattr(n, noattr)) { + if (GetFlag(n, noattr)) { /* Printf(stdout,"noattr in %s\n", Getattr(n,"name")); */ return 0; } @@ -541,7 +541,7 @@ Swig_cattr_search(Node *n, const String *attr, const String *noattr) } } #ifdef SWIG_FAST_REC_SEARCH - Setattr(n, noattr, "1"); + SetFlag(n, noattr); #endif return 0; } @@ -556,7 +556,7 @@ String * Swig_unref_call(Node *n) { String* unref = 0; n = Swig_methodclass(n); - if (!Getattr(n,"feature:nounref")) { + if (!GetFlag(n,"feature:nounref")) { unref = Getattr(n,"feature:unref"); unref = unref ? unref : Swig_cattr_search(n,"feature:unref","feature:nounref"); @@ -578,7 +578,7 @@ String * Swig_ref_call(Node *n, const String* lname) { String* ref = 0; n = Swig_methodclass(n); - if (!Getattr(n,"feature:noref")) { + if (!GetFlag(n,"feature:noref")) { ref = Getattr(n,"feature:ref"); ref = ref ? ref : Swig_cattr_search(n,"feature:ref","feature:noref");