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

Function xmlXPathNewCompExpr

ThirdParty/libxml2/vtklibxml2/xpath.c:888–907  ·  view source on GitHub ↗

* xmlXPathNewCompExpr: * * Create a new Xpath component * * Returns the newly allocated xmlXPathCompExprPtr or NULL in case of error */

Source from the content-addressed store, hash-verified

886 * Returns the newly allocated xmlXPathCompExprPtr or NULL in case of error
887 */
888static xmlXPathCompExprPtr
889xmlXPathNewCompExpr(void) {
890 xmlXPathCompExprPtr cur;
891
892 cur = (xmlXPathCompExprPtr) xmlMalloc(sizeof(xmlXPathCompExpr));
893 if (cur == NULL)
894 return(NULL);
895 memset(cur, 0, sizeof(xmlXPathCompExpr));
896 cur->maxStep = 10;
897 cur->nbStep = 0;
898 cur->steps = (xmlXPathStepOp *) xmlMalloc(cur->maxStep *
899 sizeof(xmlXPathStepOp));
900 if (cur->steps == NULL) {
901 xmlFree(cur);
902 return(NULL);
903 }
904 memset(cur->steps, 0, cur->maxStep * sizeof(xmlXPathStepOp));
905 cur->last = -1;
906 return(cur);
907}
908
909/**
910 * xmlXPathFreeCompExpr:

Callers 2

xmlXPathNewParserContextFunction · 0.85
xmlXPathTryStreamCompileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected