warning filter fixed
This commit is contained in:
parent
54b2346c71
commit
56cea1821d
2 changed files with 23 additions and 8 deletions
|
|
@ -1,7 +1,25 @@
|
||||||
%module nested_class
|
%module nested_class
|
||||||
|
|
||||||
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
|
#pragma SWIG nowarn=SWIGWARN_PARSE_UNNAMED_NESTED_CLASS
|
||||||
#pragma SWIG nowarn=SWIGWARN_PARSE_NAMED_NESTED_CLASS
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct1;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass1;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion1;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass2;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct2;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion2;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass4Typedef;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct4Typedef;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion4Typedef;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerClass5;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerStruct5;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerUnion5;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultiple;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultipleDerived;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultipleAnonTypedef1;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerMultipleNamedTypedef;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerSameName;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer2::IgnoreMe;
|
||||||
|
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) Outer::InnerSameName2;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
struct Outer {
|
struct Outer {
|
||||||
|
|
|
||||||
|
|
@ -1076,7 +1076,7 @@ static void update_nested_classes(Node *n)
|
||||||
* Create the nested class/struct/union as a forward declaration.
|
* Create the nested class/struct/union as a forward declaration.
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
static Node *nested_forward_declaration(const char *storage, const char *kind, String *sname, String *name, Node *cpp_opt_declarators, Node* nested) {
|
static Node *nested_forward_declaration(const char *storage, const char *kind, String *sname, String *name, Node *cpp_opt_declarators) {
|
||||||
Node *nn = 0;
|
Node *nn = 0;
|
||||||
int warned = 0;
|
int warned = 0;
|
||||||
|
|
||||||
|
|
@ -1120,7 +1120,7 @@ static Node *nested_forward_declaration(const char *storage, const char *kind, S
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nn && Equal(nodeType(nn), "classforward")) {
|
if (nn && Equal(nodeType(nn), "classforward")) {
|
||||||
Node *n = nested;
|
Node *n = nn;
|
||||||
SWIG_WARN_NODE_BEGIN(n);
|
SWIG_WARN_NODE_BEGIN(n);
|
||||||
Swig_warning(WARN_PARSE_NAMED_NESTED_CLASS, cparse_file, cparse_line,"Nested %s not currently supported (%s ignored)\n", kind, sname ? sname : name);
|
Swig_warning(WARN_PARSE_NAMED_NESTED_CLASS, cparse_file, cparse_line,"Nested %s not currently supported (%s ignored)\n", kind, sname ? sname : name);
|
||||||
SWIG_WARN_NODE_END(n);
|
SWIG_WARN_NODE_END(n);
|
||||||
|
|
@ -1128,10 +1128,7 @@ static Node *nested_forward_declaration(const char *storage, const char *kind, S
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!warned) {
|
if (!warned) {
|
||||||
Node *n = nested;
|
|
||||||
SWIG_WARN_NODE_BEGIN(n);
|
|
||||||
Swig_warning(WARN_PARSE_UNNAMED_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", kind);
|
Swig_warning(WARN_PARSE_UNNAMED_NESTED_CLASS, cparse_file, cparse_line, "Nested %s not currently supported (ignored).\n", kind);
|
||||||
SWIG_WARN_NODE_END(n);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nn;
|
return nn;
|
||||||
|
|
@ -3628,7 +3625,7 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
|
||||||
if (cplus_mode == CPLUS_PRIVATE) {
|
if (cplus_mode == CPLUS_PRIVATE) {
|
||||||
$$ = 0; /* skip private nested classes */
|
$$ = 0; /* skip private nested classes */
|
||||||
} else if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
|
} else if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
|
||||||
$$ = nested_forward_declaration($1, $2, $3, Copy($3), $9, $$);
|
$$ = nested_forward_declaration($1, $2, $3, Copy($3), $9);
|
||||||
} else if (nscope_inner) {
|
} else if (nscope_inner) {
|
||||||
/* this is tricky */
|
/* this is tricky */
|
||||||
/* we add the declaration in the original namespace */
|
/* we add the declaration in the original namespace */
|
||||||
|
|
@ -3741,7 +3738,7 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
|
||||||
Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, $$);
|
Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, $$);
|
||||||
if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
|
if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
|
||||||
String *name = n ? Copy(Getattr(n, "name")) : 0;
|
String *name = n ? Copy(Getattr(n, "name")) : 0;
|
||||||
$$ = nested_forward_declaration($1, $2, 0, name, n, $$);
|
$$ = nested_forward_declaration($1, $2, 0, name, n);
|
||||||
Swig_symbol_popscope();
|
Swig_symbol_popscope();
|
||||||
Delete(Namespaceprefix);
|
Delete(Namespaceprefix);
|
||||||
Namespaceprefix = Swig_symbol_qualifiedscopename(0);
|
Namespaceprefix = Swig_symbol_qualifiedscopename(0);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue