Fixed problem with preprocessor directives embedded inside an %inline directive.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@174 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2000-02-02 04:26:52 +00:00
commit 3b3e6fdb20

View file

@ -53,6 +53,7 @@ extern void format_string(char *);
extern void swig_pragma(char *, char *);
#include "internal.h"
#include "preprocessor.h"
#ifdef NEED_ALLOC
void *alloca(unsigned n) {
@ -1054,7 +1055,17 @@ statement : INCLUDE STRING LBRACE {
init_language();
$2[strlen($2) - 1] = 0;
fprintf(f_header, "%s\n", $2);
start_inline($2,start_line);
{
/* Need to run through the preprocessor */
DOH *cpps;
DOH *s = NewString($2);
Setline(s,start_line);
Setfile(s,input_file);
cpps = Preprocessor_parse(s);
start_inline(Char(cpps), start_line);
Delete(s);
Delete(cpps);
}
}
}