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

Function xmlPatternGetStreamCtxt

ThirdParty/libxml2/vtklibxml2/pattern.c:2438–2465  ·  view source on GitHub ↗

* xmlPatternGetStreamCtxt: * @comp: the precompiled pattern * * Get a streaming context for that pattern * Use xmlFreeStreamCtxt to free the context. * * Returns a pointer to the context or NULL in case of failure */

Source from the content-addressed store, hash-verified

2436 * Returns a pointer to the context or NULL in case of failure
2437 */
2438xmlStreamCtxtPtr
2439xmlPatternGetStreamCtxt(xmlPatternPtr comp)
2440{
2441 xmlStreamCtxtPtr ret = NULL, cur;
2442
2443 if ((comp == NULL) || (comp->stream == NULL))
2444 return(NULL);
2445
2446 while (comp != NULL) {
2447 if (comp->stream == NULL)
2448 goto failed;
2449 cur = xmlNewStreamCtxt(comp->stream);
2450 if (cur == NULL)
2451 goto failed;
2452 if (ret == NULL)
2453 ret = cur;
2454 else {
2455 cur->next = ret->next;
2456 ret->next = cur;
2457 }
2458 cur->flags = comp->flags;
2459 comp = comp->next;
2460 }
2461 return(ret);
2462failed:
2463 xmlFreeStreamCtxt(ret);
2464 return(NULL);
2465}
2466
2467/**
2468 * xmlPatternStreamable:

Callers 5

streamFileFunction · 0.85
walkDocFunction · 0.85
xmlXPathRunStreamEvalFunction · 0.85
patternTestFunction · 0.85

Calls 2

xmlNewStreamCtxtFunction · 0.85
xmlFreeStreamCtxtFunction · 0.85

Tested by 1

patternTestFunction · 0.68