MCPcopy Create free account
hub / github.com/KDE/kdevelop / cmListFileLexer_yylex_init_extra

Function cmListFileLexer_yylex_init_extra

plugins/cmake/parser/cmListFileLexer.c:2236–2262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2234 */
2235
2236int cmListFileLexer_yylex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals )
2237
2238{
2239 struct yyguts_t dummy_yyguts;
2240
2241 cmListFileLexer_yyset_extra (yy_user_defined, &dummy_yyguts);
2242
2243 if (ptr_yy_globals == NULL){
2244 errno = EINVAL;
2245 return 1;
2246 }
2247
2248 *ptr_yy_globals = (yyscan_t) cmListFileLexer_yyalloc ( sizeof( struct yyguts_t ), &dummy_yyguts );
2249
2250 if (*ptr_yy_globals == NULL){
2251 errno = ENOMEM;
2252 return 1;
2253 }
2254
2255 /* By setting to 0xAA, we expose bugs in
2256 yy_init_globals. Leave at 0x00 for releases. */
2257 memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t));
2258
2259 cmListFileLexer_yyset_extra (yy_user_defined, *ptr_yy_globals);
2260
2261 return yy_init_globals ( *ptr_yy_globals );
2262}
2263
2264static int yy_init_globals (yyscan_t yyscanner)
2265{

Callers

nothing calls this directly

Calls 3

cmListFileLexer_yyallocFunction · 0.85
yy_init_globalsFunction · 0.85

Tested by

no test coverage detected