diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2009-07-02 18:25:04 +0000 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2009-07-02 18:25:04 +0000 |
commit | 3dbca3bd05c779ec9d46f2141142d6be07468af8 (patch) | |
tree | 14604d3bf0ebcfd5872c0950478e1b03620fbfe6 | |
parent | 06346ca98b2f8b3bcaf74c24eff1476549762bc5 (diff) | |
download | swig-3dbca3bd05c779ec9d46f2141142d6be07468af8.tar.gz |
Fix syntax error when a nested struct contains a comment containing a * followed eventually by a /
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11344 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r-- | CHANGES.current | 4 | ||||
-rw-r--r-- | Examples/test-suite/nested_comment.i | 2 | ||||
-rw-r--r-- | Source/CParse/parser.y | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES.current b/CHANGES.current index 730cefc04..de8203538 100644 --- a/CHANGES.current +++ b/CHANGES.current @@ -1,6 +1,10 @@ Version 1.3.40 (in progress) ============================ +2009-07-02: wsfulton + Fix syntax error when a nested struct contains a comment containing a * followed eventually by a /. + Regression from 1.3.37, reported by Solomon Gibbs. + 2009-06-30: olly [Ruby] Undefine close and connect macros defined by Ruby API headers as we don't need them and they can clash with C++ methods diff --git a/Examples/test-suite/nested_comment.i b/Examples/test-suite/nested_comment.i index ea365a6fe..a9948eb0f 100644 --- a/Examples/test-suite/nested_comment.i +++ b/Examples/test-suite/nested_comment.i @@ -27,7 +27,7 @@ struct a struct { /*struct*/ struct { - int b; + int b; /**< v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ } c; } d; }; diff --git a/Source/CParse/parser.y b/Source/CParse/parser.y index 0babfbbb8..11232fd78 100644 --- a/Source/CParse/parser.y +++ b/Source/CParse/parser.y @@ -1054,6 +1054,8 @@ static void strip_comments(char *string) { case 5: if (*c == '/') state = 0; + else + state = 1; *c = ' '; break; case 6: |