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

java:const
            java:downcast
            compactdefaultargs
            ignore
            valuewrapper


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-09-30 21:37:40 +00:00
commit beebb0a8e1
13 changed files with 40 additions and 42 deletions

View file

@ -772,8 +772,8 @@ Swig_MethodToFunction(Node *n, String *classname, int flags) {
This happens in python, but may also happens in other target
languages.
*/
if (Getattr(n,"feature:self:disown")) {
Setattr(p,"wrap:disown",Getattr(n,"feature:self:disown"));
if (GetFlag(n,"feature:self:disown")) {
Setattr(p,"wrap:disown","1");
}
set_nextSibling(p,parms);
Delete(type);

View file

@ -208,7 +208,7 @@ Swig_name_get(const String_or_char *vname) {
String *f;
#ifdef SWIG_DEBUG
Printf(stdout,"name get: '%s'\n", vname);
Printf(stdout,"Swig_name_get: '%s'\n", vname);
#endif
r = NewString("");
@ -395,7 +395,7 @@ Swig_name_object_set(Hash *namehash, String *name, SwigType *decl, DOH *object)
DOH *n;
#ifdef SWIG_DEBUG
Printf(stdout,"name set: '%s', '%s'\n", name, decl);
Printf(stdout,"Swig_name_object_set: '%s', '%s'\n", name, decl);
#endif
n = Getattr(namehash,name);
if (!n) {
@ -571,7 +571,7 @@ void features_get(Hash *features, String *tname, SwigType *decl, SwigType *ncdec
{
Node *n = Getattr(features,tname);
#ifdef SWIG_DEBUG
Printf(stdout," feature_get: %s\n", tname);
Printf(stdout," features_get: %s\n", tname);
#endif
if (n) {
merge_features(get_object(n,0),node);
@ -608,7 +608,7 @@ Swig_features_get(Hash *features, String *prefix, String *name, SwigType *decl,
}
#ifdef SWIG_DEBUG
Printf(stdout,"feature_get: %s %s %s\n", prefix, name, decl);
Printf(stdout,"SWwig_features_get: %s %s %s\n", prefix, name, decl);
#endif
/* Global features */
@ -676,7 +676,7 @@ Swig_feature_set(Hash *features, const String_or_char *name, SwigType *decl, con
Hash *fhash;
#ifdef SWIG_DEBUG
Printf(stdout,"feature_set: %s %s %s %s\n", name, decl, featurename,value);
Printf(stdout,"Swig_feature_set: %s %s %s %s\n", name, decl, featurename,value);
#endif
n = Getattr(features,name);

View file

@ -661,7 +661,7 @@ Swig_symbol_add(String_or_char *symname, Node *n) {
}
/* If node is ignored. We don't proceed any further */
if (Getattr(n,"feature:ignore")) return n;
if (GetFlag(n,"feature:ignore")) return n;
/* See if the symbol already exists in the table */
c = Getattr(current,symname);

View file

@ -1277,7 +1277,7 @@ SwigType *SwigType_alttype(SwigType *t, int local_tmap) {
SwigType *td = SwigType_strip_qualifiers(ftd);
Delete(ftd);
if ((n = Swig_symbol_clookup(td,0))) {
if (Getattr(n,"feature:valuewrapper")) {
if (GetFlag(n,"feature:valuewrapper")) {
use_wrapper = 1;
} else {
if ((Strcmp(nodeType(n),"class") == 0)
@ -1314,7 +1314,7 @@ SwigType *SwigType_alttype(SwigType *t, int local_tmap) {
&& !Getattr(n,"allocate:noassign")
&& (Getattr(n,"allocate:default_constructor")))
|| (Getattr(n,"feature:novaluewrapper"))) {
use_wrapper = Getattr(n,"feature:valuewrapper") ? 1 : 0;
use_wrapper = GetFlag(n,"feature:valuewrapper");
}
}
} else {