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:
parent
33486da5a5
commit
beebb0a8e1
13 changed files with 40 additions and 42 deletions
|
|
@ -1267,8 +1267,7 @@ class JAVA : public Language {
|
|||
bool is_enum_item = (Cmp(nodeType(n), "enumitem") == 0);
|
||||
|
||||
// The %javaconst feature determines how the constant value is obtained
|
||||
String *const_feature = Getattr(n,"feature:java:const");
|
||||
bool const_feature_flag = const_feature && Cmp(const_feature, "0") != 0;
|
||||
int const_feature_flag = GetFlag(n,"feature:java:const");
|
||||
|
||||
/* Adjust the enum type for the Swig_typemap_lookup.
|
||||
* We want the same jstype typemap for all the enum items so we use the enum type (parent node). */
|
||||
|
|
@ -1713,7 +1712,7 @@ class JAVA : public Language {
|
|||
good place to put this code, since Abstract Base Classes (ABCs) can and should have
|
||||
downcasts, making the constructorHandler() a bad place (because ABCs don't get to
|
||||
have constructors emitted.) */
|
||||
if (Getattr(n, "feature:javadowncast")) {
|
||||
if (GetFlag(n, "feature:javadowncast")) {
|
||||
String *jni_imclass_name = makeValidJniName(imclass_name);
|
||||
String *jni_class_name = makeValidJniName(proxy_class_name);
|
||||
String *norm_name = SwigType_namestr(Getattr(n, "name"));
|
||||
|
|
@ -2337,8 +2336,7 @@ class JAVA : public Language {
|
|||
|
||||
if (!value) {
|
||||
// The %javaconst feature determines how the constant value is obtained
|
||||
String *const_feature = Getattr(n,"feature:java:const");
|
||||
bool const_feature_flag = const_feature && Cmp(const_feature, "0") != 0;
|
||||
int const_feature_flag = GetFlag(n,"feature:java:const");
|
||||
|
||||
if (const_feature_flag) {
|
||||
// Use the C syntax to make a true Java constant and hope that it compiles as Java code
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue