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:
@@ -190,7 +190,7 @@ void Warning (unsigned Level, const char* Format, ...)
|
||||
Collection LineInfos = STATIC_COLLECTION_INITIALIZER;
|
||||
|
||||
/* Get line infos for the current position */
|
||||
GetFullLineInfo (&LineInfos, 0);
|
||||
GetFullLineInfo (&LineInfos);
|
||||
|
||||
/* Output the message */
|
||||
va_start (ap, Format);
|
||||
@@ -198,6 +198,7 @@ void Warning (unsigned Level, const char* Format, ...)
|
||||
va_end (ap);
|
||||
|
||||
/* Free the line info list */
|
||||
ReleaseFullLineInfo (&LineInfos);
|
||||
DoneCollection (&LineInfos);
|
||||
}
|
||||
}
|
||||
@@ -265,7 +266,7 @@ void Error (const char* Format, ...)
|
||||
Collection LineInfos = STATIC_COLLECTION_INITIALIZER;
|
||||
|
||||
/* Get line infos for the current position */
|
||||
GetFullLineInfo (&LineInfos, 0);
|
||||
GetFullLineInfo (&LineInfos);
|
||||
|
||||
/* Output the message */
|
||||
va_start (ap, Format);
|
||||
@@ -273,6 +274,7 @@ void Error (const char* Format, ...)
|
||||
va_end (ap);
|
||||
|
||||
/* Free the line info list */
|
||||
ReleaseFullLineInfo (&LineInfos);
|
||||
DoneCollection (&LineInfos);
|
||||
}
|
||||
|
||||
@@ -297,7 +299,7 @@ void ErrorSkip (const char* Format, ...)
|
||||
Collection LineInfos = STATIC_COLLECTION_INITIALIZER;
|
||||
|
||||
/* Get line infos for the current position */
|
||||
GetFullLineInfo (&LineInfos, 0);
|
||||
GetFullLineInfo (&LineInfos);
|
||||
|
||||
/* Output the message */
|
||||
va_start (ap, Format);
|
||||
@@ -305,6 +307,7 @@ void ErrorSkip (const char* Format, ...)
|
||||
va_end (ap);
|
||||
|
||||
/* Free the line info list */
|
||||
ReleaseFullLineInfo (&LineInfos);
|
||||
DoneCollection (&LineInfos);
|
||||
|
||||
/* Skip tokens until we reach the end of the line */
|
||||
|
||||
Reference in New Issue
Block a user