Ignore unknown preprocessor directives which are inside an inactive
conditional (github issue #394, reported by Dan Wilcox). Regression introduced in 3.0.3.
This commit is contained in:
parent
ece1009c5d
commit
d26a505dad
3 changed files with 24 additions and 1 deletions
|
|
@ -1771,7 +1771,10 @@ String *Preprocessor_parse(String *s) {
|
|||
} else if (Equal(id, "")) {
|
||||
/* Null directive */
|
||||
} else {
|
||||
Swig_error(Getfile(s), Getline(id), "Unknown SWIG preprocessor directive: %s (if this is a block of target language code, delimit it with %%{ and %%})\n", id);
|
||||
/* Ignore unknown preprocessor directives which are inside an inactive
|
||||
* conditional (github issue #394). */
|
||||
if (allow)
|
||||
Swig_error(Getfile(s), Getline(id), "Unknown SWIG preprocessor directive: %s (if this is a block of target language code, delimit it with %%{ and %%})\n", id);
|
||||
}
|
||||
for (i = 0; i < cpp_lines; i++)
|
||||
Putc('\n', ns);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue