Skip to content

Commit

Permalink
scanner: fix buffer stack popping in yylex_destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
happyCoder92 committed Apr 29, 2024
1 parent e241be6 commit faaa548
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/c99-flex.skl
Original file line number Diff line number Diff line change
Expand Up @@ -2504,8 +2504,6 @@ int yylex_destroy (yyscan_t yyscanner) {

/* Pop the buffer stack, destroying each element. */
while(yy_current_buffer(yyscanner)) {
yy_delete_buffer( yy_current_buffer(yyscanner), yyscanner );
yyscanner->yy_buffer_stack[yyscanner->yy_buffer_stack_top] = NULL;
yypop_buffer_state(yyscanner);
}

Expand Down
2 changes: 0 additions & 2 deletions src/cpp-flex.skl
Original file line number Diff line number Diff line change
Expand Up @@ -3827,8 +3827,6 @@ int yylex_destroy (M4_YY_DEF_ONLY_ARG) {

/* Pop the buffer stack, destroying each element. */
while(yy_current_buffer()) {
yy_delete_buffer( yy_current_buffer() M4_YY_CALL_LAST_ARG );
YY_CURRENT_BUFFER_LVALUE = NULL;
yypop_buffer_state(M4_YY_CALL_ONLY_ARG);
}

Expand Down
2 changes: 0 additions & 2 deletions src/go-flex.skl
Original file line number Diff line number Diff line change
Expand Up @@ -2347,8 +2347,6 @@ int yylex_destroy(FlexLexer *yyscanner) {

/* Pop the buffer stack, destroying each element. */
while(yy_current_buffer(yyscanner)) {
yy_delete_buffer(yy_current_buffer(yyscanner), yyscanner);
yyscanner->yyBufferStack[yyscanner->yyBufferStackTop] = NULL;
yypop_buffer_state(yyscanner);
}

Expand Down

0 comments on commit faaa548

Please sign in to comment.