MCPcopy Create free account
hub / github.com/apache/httpd / ap_expr_yypush_buffer_state

Function ap_expr_yypush_buffer_state

server/util_expr_scan.c:2108–2133  ·  view source on GitHub ↗

Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * @param yyscanner The scanner object. */

Source from the content-addressed store, hash-verified

2106 * @param yyscanner The scanner object.
2107 */
2108void ap_expr_yypush_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner)
2109{
2110 struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
2111 if (new_buffer == NULL)
2112 return;
2113
2114 ap_expr_yyensure_buffer_stack(yyscanner);
2115
2116 /* This block is copied from ap_expr_yy_switch_to_buffer. */
2117 if ( YY_CURRENT_BUFFER )
2118 {
2119 /* Flush out information for old buffer. */
2120 *yyg->yy_c_buf_p = yyg->yy_hold_char;
2121 YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p;
2122 YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars;
2123 }
2124
2125 /* Only push if top exists. Otherwise, replace top. */
2126 if (YY_CURRENT_BUFFER)
2127 yyg->yy_buffer_stack_top++;
2128 YY_CURRENT_BUFFER_LVALUE = new_buffer;
2129
2130 /* copied from ap_expr_yy_switch_to_buffer. */
2131 ap_expr_yy_load_buffer_state(yyscanner );
2132 yyg->yy_did_buffer_switch_on_eof = 1;
2133}
2134
2135/** Removes and deletes the top of the stack, if present.
2136 * The next element becomes the new top.

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected