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

@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 3.0.3 (in progress)
===========================
2014-09-01: olly
Issue an error for unknown SWIG preprocessor directives, rather
than quietly ignoring them. Reported by jrhelsey in issue#217.
2014-08-15: talby
[Perl] Include guard fix for nested modules from Anthony Heading (SF Patch #350).

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);