MCPcopy Create free account
hub / github.com/WinMerge/winmerge / XML_ParserFree

Function XML_ParserFree

Externals/poco/XML/src/xmlparse.cpp:1935–2028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1933}
1934
1935void XMLCALL
1936XML_ParserFree(XML_Parser parser) {
1937 TAG *tagList;
1938 OPEN_INTERNAL_ENTITY *entityList;
1939 if (parser == NULL)
1940 return;
1941 /* free m_tagStack and m_freeTagList */
1942 tagList = parser->m_tagStack;
1943 for (;;) {
1944 TAG *p;
1945 if (tagList == NULL) {
1946 if (parser->m_freeTagList == NULL)
1947 break;
1948 tagList = parser->m_freeTagList;
1949 parser->m_freeTagList = NULL;
1950 }
1951 p = tagList;
1952 tagList = tagList->parent;
1953 FREE(parser, p->buf);
1954 destroyBindings(p->bindings, parser);
1955 FREE(parser, p);
1956 }
1957 /* free m_openInternalEntities and m_freeInternalEntities */
1958 entityList = parser->m_openInternalEntities;
1959 for (;;) {
1960 OPEN_INTERNAL_ENTITY *openEntity;
1961 if (entityList == NULL) {
1962 if (parser->m_freeInternalEntities == NULL)
1963 break;
1964 entityList = parser->m_freeInternalEntities;
1965 parser->m_freeInternalEntities = NULL;
1966 }
1967 openEntity = entityList;
1968 entityList = entityList->next;
1969 FREE(parser, openEntity);
1970 }
1971 /* free m_openAttributeEntities and m_freeAttributeEntities */
1972 entityList = parser->m_openAttributeEntities;
1973 for (;;) {
1974 OPEN_INTERNAL_ENTITY *openEntity;
1975 if (entityList == NULL) {
1976 if (parser->m_freeAttributeEntities == NULL)
1977 break;
1978 entityList = parser->m_freeAttributeEntities;
1979 parser->m_freeAttributeEntities = NULL;
1980 }
1981 openEntity = entityList;
1982 entityList = entityList->next;
1983 FREE(parser, openEntity);
1984 }
1985 /* free m_openValueEntities and m_freeValueEntities */
1986 entityList = parser->m_openValueEntities;
1987 for (;;) {
1988 OPEN_INTERNAL_ENTITY *openEntity;
1989 if (entityList == NULL) {
1990 if (parser->m_freeValueEntities == NULL)
1991 break;
1992 entityList = parser->m_freeValueEntities;

Callers 7

UnpackFileMethod · 0.85
~ParserEngineMethod · 0.85
initMethod · 0.85
xmlparse.cppFile · 0.85
~XMLStreamParserMethod · 0.85

Calls 3

destroyBindingsFunction · 0.85
poolDestroyFunction · 0.85
dtdDestroyFunction · 0.85

Tested by

no test coverage detected