Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix warning suppression using %warnfilter for PHP reserved class names.

The features need to be merged in before issuing a warning as
%warnfilter is a %feature.
  • Loading branch information...
commit d55692c31e72f8a5f99bf78eb2f37f4ba52479a7 1 parent c5bc0aa
@wsfulton wsfulton authored
Showing with 6 additions and 2 deletions.
  1. +3 −0  CHANGES.current
  2. +3 −2 Source/CParse/parser.y
View
3  CHANGES.current
@@ -5,6 +5,9 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.0 (in progress)
============================
+2014-02-21: wsfulton
+ [PHP] Fix warning suppression using %warnfilter for PHP reserved class names.
+
2014-02-19: olly
[Lua] Add keyword warnings for Lua keywords and Basic Functions.
View
5 Source/CParse/parser.y
@@ -3488,6 +3488,7 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Setattr($<node>$, "nested:outer", currentOuterClass);
set_access_mode($<node>$);
}
+ Swig_features_get(Swig_cparse_features(), Namespaceprefix, Getattr($<node>$, "name"), 0, $<node>$);
/* save yyrename to the class attribute, to be used later in add_symbols()*/
Setattr($<node>$, "class_rename", make_name($<node>$, $3, 0));
Setattr($<node>$, "Classprefix", $3);
@@ -3631,7 +3632,6 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Delattr($<node>$, "Classprefix");
Delete(Namespaceprefix);
Namespaceprefix = Swig_symbol_qualifiedscopename(0);
- Swig_features_get(Swig_cparse_features(), Namespaceprefix, Getattr($$, "name"), 0, $$);
if (cplus_mode == CPLUS_PRIVATE) {
$$ = 0; /* skip private nested classes */
} else if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
@@ -3712,6 +3712,8 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
Setattr($<node>$, "nested:outer", currentOuterClass);
set_access_mode($<node>$);
}
+ Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, $<node>$);
+ /* save yyrename to the class attribute, to be used later in add_symbols()*/
Setattr($<node>$, "class_rename", make_name($<node>$,0,0));
if (strcmp($2,"class") == 0) {
cplus_mode = CPLUS_PRIVATE;
@@ -3745,7 +3747,6 @@ cpp_class_decl : storage_class cpptype idcolon inherit LBRACE {
/* Check for pure-abstract class */
Setattr($$,"abstracts", pure_abstracts($6));
n = $8;
- Swig_features_get(Swig_cparse_features(), Namespaceprefix, 0, 0, $$);
if (cparse_cplusplus && currentOuterClass && ignore_nested_classes && !GetFlag($$, "feature:flatnested")) {
String *name = n ? Copy(Getattr(n, "name")) : 0;
$$ = nested_forward_declaration($1, $2, 0, name, n);
Please sign in to comment.
Something went wrong with that request. Please try again.