Nothing Special   »   [go: up one dir, main page]

Skip to content

Commit

Permalink
Remove unused field in struct Scanner
Browse files Browse the repository at this point in the history
This was being initialized to NULL but never actually used.  The
filename gets tracked via the String objects being scanned.
  • Loading branch information
ojwb committed Oct 5, 2024
1 parent dbbe636 commit c61da55
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Source/Swig/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ struct Scanner {
int start_line; /* Starting line of certain declarations */
int line;
int yylen; /* Length of text pushed into text */
String *file;
String *error; /* Last error message (if any) */
int error_line; /* Error line number */
int freeze_line; /* Suspend line number updates */
Expand All @@ -58,7 +57,6 @@ Scanner *NewScanner(void) {
Scanner *s;
s = (Scanner *) Malloc(sizeof(Scanner));
s->line = 1;
s->file = 0;
s->nexttoken = -1;
s->start_line = 1;
s->yylen = 0;
Expand All @@ -85,7 +83,6 @@ void DelScanner(Scanner *s) {
Delete(s->scanobjs);
Delete(s->brackets);
Delete(s->text);
Delete(s->file);
Delete(s->error);
Delete(s->str);
Free(s->idstart);
Expand Down Expand Up @@ -113,7 +110,6 @@ void Scanner_clear(Scanner *s) {
s->yylen = 0;
/* Should these be cleared too?
s->idstart;
s->file;
s->error_line;
s->freeze_line;
*/
Expand Down

0 comments on commit c61da55

Please sign in to comment.