Issue an error for unknown SWIG preprocessor directives, rather

than quietly ignoring them.  Reported by jrhelsey in issue#217.
This commit is contained in:
Olly Betts 2014-09-01 00:26:15 -03:00
commit 255c929c56
2 changed files with 6 additions and 0 deletions

View file

@ -1768,6 +1768,8 @@ String *Preprocessor_parse(String *s) {
}
} else if (Equal(id, kpp_level)) {
Swig_error(Getfile(s), Getline(id), "cpp debug: level = %d, startlevel = %d\n", level, start_level);
} else {
Swig_error(Getfile(s), Getline(id), "Unknown SWIG preprocessor directive: %s\n", id);
}
for (i = 0; i < cpp_lines; i++)
Putc('\n', ns);