Skip to content

Commit

Permalink
refactor: dataflush() no longer checks 'gentables' flag within function
Browse files Browse the repository at this point in the history
  • Loading branch information
Explorer09 committed Apr 26, 2024
1 parent 8caf5fd commit 7341f65
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 6 additions & 4 deletions src/dfa.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,9 +518,10 @@ size_t ntod (void)
yynxt_data[yynxt_curr++] = 0;
}

dataflush ();
if (gentables)
if (gentables) {
dataflush ();
outn ("M4_HOOK_TABLE_CONTINUE");
}
}

/* Create the first states. */
Expand Down Expand Up @@ -697,9 +698,10 @@ size_t ntod (void)
state[i] ? state[i] : -ds;
}

dataflush ();
if (gentables)
if (gentables) {
dataflush ();
outn ("M4_HOOK_TABLE_CONTINUE");
}
}

else if (ctrl.fullspd)
Expand Down
4 changes: 1 addition & 3 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,7 @@ void dataend (const char *endit)

void dataflush (void)
{
/* short circuit any output */
if (!gentables)
return;
assert (gentables);

if (datapos > 0)
outc ('\n');
Expand Down

0 comments on commit 7341f65

Please # to comment.