implement the #warning/#error cpp directives

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7644 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-10-13 09:18:40 +00:00
commit 4e2c70a55f

View file

@ -1385,6 +1385,14 @@ Preprocessor_parse(String *s)
}
}
}
} else if (Cmp(id,"warning") == 0) {
if (allow) {
Swig_warning(WARN_PP_CPP_WARNING,Getfile(s),Getline(id),"%s\n", value);
}
} else if (Cmp(id,"error") == 0) {
if (allow) {
Swig_error(Getfile(s),Getline(id),"%s\n",value);
}
} else if (Cmp(id,"line") == 0) {
} else if (Cmp(id,"include") == 0) {
if (((include_all) || (import_all)) && (allow)) {