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

Function ap_expr_yylex_init_extra

server/util_expr_scan.c:2525–2551  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2523 */
2524
2525int ap_expr_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2526
2527{
2528 struct yyguts_t dummy_yyguts;
2529
2530 ap_expr_yyset_extra (yy_user_defined, &dummy_yyguts);
2531
2532 if (ptr_yy_globals == NULL){
2533 errno = EINVAL;
2534 return 1;
2535 }
2536
2537 *ptr_yy_globals = (yyscan_t) ap_expr_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2538
2539 if (*ptr_yy_globals == NULL){
2540 errno = ENOMEM;
2541 return 1;
2542 }
2543
2544 /* By setting to 0xAA, we expose bugs in
2545 yy_init_globals. Leave at 0x00 for releases. */
2546 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2547
2548 ap_expr_yyset_extra (yy_user_defined, *ptr_yy_globals);
2549
2550 return yy_init_globals ( *ptr_yy_globals );
2551}
2552
2553static int yy_init_globals (yyscan_t yyscanner)
2554{

Callers

nothing calls this directly

Calls 3

ap_expr_yyset_extraFunction · 0.85
ap_expr_yyallocFunction · 0.85
yy_init_globalsFunction · 0.85

Tested by

no test coverage detected