Add reference counting to line infos. This allows better tracking of the ones
that are actually used. git-svn-id: svn://svn.cc65.org/cc65/trunk@5212 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -1142,12 +1142,13 @@ CharAgain:
|
||||
} else if (CComments) {
|
||||
/* Remember the position, then skip the '*' */
|
||||
Collection LineInfos = STATIC_COLLECTION_INITIALIZER;
|
||||
GetFullLineInfo (&LineInfos, 0);
|
||||
GetFullLineInfo (&LineInfos);
|
||||
NextChar ();
|
||||
do {
|
||||
while (C != '*') {
|
||||
if (C == EOF) {
|
||||
LIError (&LineInfos, "Unterminated comment");
|
||||
ReleaseFullLineInfo (&LineInfos);
|
||||
DoneCollection (&LineInfos);
|
||||
goto CharAgain;
|
||||
}
|
||||
@@ -1156,6 +1157,7 @@ CharAgain:
|
||||
NextChar ();
|
||||
} while (C != '/');
|
||||
NextChar ();
|
||||
ReleaseFullLineInfo (&LineInfos);
|
||||
DoneCollection (&LineInfos);
|
||||
goto Again;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user