File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,8 @@ the issue number to the end of the URL: https://github.com/swig/swig/issues/
7
7
Version 4.0.2 (in progress)
8
8
===========================
9
9
10
+ 2020-01-16: mcfarljm
11
+ #1632 #1659 Fix newline handling for doxygen "///" comments
10
12
11
13
2020-01-14: mcfarljm
12
14
#1608 Improve doxygen support.
Original file line number Diff line number Diff line change @@ -428,6 +428,7 @@ static int yylook(void) {
428
428
/* Concatenate or skip all consecutive comments at once. */
429
429
do {
430
430
String * cmt = Scanner_text (scan );
431
+ String * cmt_modified = 0 ;
431
432
char * loc = Char (cmt );
432
433
if ((strncmp (loc , "/*@SWIG" , 7 ) == 0 ) && (loc [Len (cmt )- 3 ] == '@' )) {
433
434
Scanner_locator (scan , cmt );
@@ -439,9 +440,9 @@ static int yylook(void) {
439
440
slashStyle = 1 ;
440
441
if (Len (cmt ) == 3 ) {
441
442
/* Modify to make length=4 to ensure that the empty comment does
442
- get processed to preserve the newlines in the original
443
- comments. */
444
- cmt = NewStringf ( "%s " , cmt ) ;
443
+ get processed to preserve the newlines in the original comments. */
444
+ cmt_modified = NewStringf ( "%s " , cmt );
445
+ cmt = cmt_modified ;
445
446
loc = Char (cmt );
446
447
}
447
448
}
@@ -492,6 +493,7 @@ static int yylook(void) {
492
493
do {
493
494
tok = Scanner_token (scan );
494
495
} while (tok == SWIG_TOKEN_ENDLINE );
496
+ Delete (cmt_modified );
495
497
} while (tok == SWIG_TOKEN_COMMENT );
496
498
497
499
Scanner_pushtoken (scan , tok , Scanner_text (scan ));
You can’t perform that action at this time.
0 commit comments