Add ability to suppress some director warnings by their method name, not just the containing class name
This commit is contained in:
parent
7b50640c05
commit
9d0b20916f
4 changed files with 14 additions and 10 deletions
|
|
@ -88,7 +88,6 @@ extern int AddExtern;
|
|||
* ---------------------------------------------------------------------- */
|
||||
|
||||
int Dispatcher::emit_one(Node *n) {
|
||||
String *wrn;
|
||||
int ret = SWIG_OK;
|
||||
|
||||
char *tag = Char(nodeType(n));
|
||||
|
|
@ -104,10 +103,9 @@ int Dispatcher::emit_one(Node *n) {
|
|||
return SWIG_OK;
|
||||
|
||||
/* Look for warnings */
|
||||
wrn = Getattr(n, "feature:warnfilter");
|
||||
if (wrn) {
|
||||
String *wrn = Getattr(n, "feature:warnfilter");
|
||||
if (wrn)
|
||||
Swig_warnfilter(wrn, 1);
|
||||
}
|
||||
|
||||
/* ============================================================
|
||||
* C/C++ parsing
|
||||
|
|
@ -181,9 +179,8 @@ int Dispatcher::emit_one(Node *n) {
|
|||
Swig_error(input_file, line_number, "Unrecognized parse tree node type '%s'\n", tag);
|
||||
ret = SWIG_ERROR;
|
||||
}
|
||||
if (wrn) {
|
||||
if (wrn)
|
||||
Swig_warnfilter(wrn, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
@ -2063,6 +2060,10 @@ int Language::classDirectorMethods(Node *n) {
|
|||
if (GetFlag(method, "feature:nodirector"))
|
||||
continue;
|
||||
|
||||
String *wrn = Getattr(method, "feature:warnfilter");
|
||||
if (wrn)
|
||||
Swig_warnfilter(wrn, 1);
|
||||
|
||||
String *type = Getattr(method, "nodeType");
|
||||
if (!Cmp(type, "destructor")) {
|
||||
classDirectorDestructor(method);
|
||||
|
|
@ -2074,6 +2075,8 @@ int Language::classDirectorMethods(Node *n) {
|
|||
SetFlag(item, "director");
|
||||
Swig_restore(method);
|
||||
}
|
||||
if (wrn)
|
||||
Swig_warnfilter(wrn, 0);
|
||||
}
|
||||
|
||||
return SWIG_OK;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue