MCPcopy Create free account
hub / github.com/Kitware/CMake / cmListFileLexerDestroy

Function cmListFileLexerDestroy

Source/LexerParser/cmListFileLexer.c:2696–2717  ·  view source on GitHub ↗

--------------------------------------------------------------------------*/

Source from the content-addressed store, hash-verified

2694
2695/*--------------------------------------------------------------------------*/
2696static void cmListFileLexerDestroy(cmListFileLexer* lexer)
2697{
2698 cmListFileLexerSetToken(lexer, 0, 0);
2699 if (lexer->file || lexer->string_buffer) {
2700 cmListFileLexer_yylex_destroy(lexer->scanner);
2701 if (lexer->file) {
2702 fclose(lexer->file);
2703 lexer->file = 0;
2704 }
2705 if (lexer->read_size != 0) {
2706 memset(lexer->read_buffer, 0, sizeof(lexer->read_buffer));
2707 lexer->read_size = 0;
2708 lexer->read_position = 0;
2709 }
2710 if (lexer->string_buffer) {
2711 free(lexer->string_buffer);
2712 lexer->string_buffer = 0;
2713 lexer->string_left = 0;
2714 lexer->string_position = 0;
2715 }
2716 }
2717}
2718
2719/*--------------------------------------------------------------------------*/
2720cmListFileLexer* cmListFileLexer_New(void)

Callers 2

Calls 1

cmListFileLexerSetTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…