diff --git a/CHANGES.current b/CHANGES.current index e0e51c73e..ef07de537 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 1.3.32 (in progress) ============================ +06/05/2007: olly + Fix reporting of filenames in errors after %include (patch from + Leigh Smith in #1731040; also reported as #1699940). + 05/31/2007: olly [Python] Fix "missing initialiser" warning when compiling generated C/C++ diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index d01828dd2..161d8b4ca 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -1360,7 +1360,7 @@ static void tag_nodes(Node *n, const String_or_char *attrname, DOH *value) { } dtype; struct { char *type; - char *filename; + String *filename; int line; } loc; struct { @@ -1863,9 +1863,9 @@ fragment_directive: FRAGMENT LPAREN fname COMMA kwargs RPAREN HBLOCK { ------------------------------------------------------------ */ include_directive: includetype options string LBRACKET { - $1.filename = Swig_copy_string(cparse_file); + $1.filename = Copy(cparse_file); $1.line = cparse_line; - scanner_set_location($3,1); + scanner_set_location(NewString($3),1); } interface RBRACKET { String *mname = 0; $$ = $6;