MCPcopy Create free account
hub / github.com/Kitware/VTK / initializeLibxml2

Function initializeLibxml2

ThirdParty/libxml2/vtklibxml2/runxmlconf.c:150–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148static xmlXPathContextPtr ctxtXPath;
149
150static void
151initializeLibxml2(void) {
152 xmlMemSetup(xmlMemFree, xmlMemMalloc, xmlMemRealloc, xmlMemoryStrdup);
153 xmlInitParser();
154 xmlSetExternalEntityLoader(testExternalEntityLoader);
155 ctxtXPath = xmlXPathNewContext(NULL);
156 /*
157 * Deactivate the cache if created; otherwise we have to create/free it
158 * for every test, since it will confuse the memory leak detection.
159 * Note that normally this need not be done, since the cache is not
160 * created until set explicitly with xmlXPathContextSetCache();
161 * but for test purposes it is sometimes useful to activate the
162 * cache by default for the whole library.
163 */
164 if (ctxtXPath->cache != NULL)
165 xmlXPathContextSetCache(ctxtXPath, 0, -1, 0);
166}
167
168/************************************************************************
169 * *

Callers 1

mainFunction · 0.70

Calls 5

xmlMemSetupFunction · 0.85
xmlInitParserFunction · 0.85
xmlXPathNewContextFunction · 0.85
xmlXPathContextSetCacheFunction · 0.85

Tested by

no test coverage detected