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

Function xmlNewPattern

ThirdParty/libxml2/vtklibxml2/pattern.c:199–219  ·  view source on GitHub ↗

* xmlNewPattern: * * Create a new XSLT Pattern * * Returns the newly allocated xmlPatternPtr or NULL in case of error */

Source from the content-addressed store, hash-verified

197 * Returns the newly allocated xmlPatternPtr or NULL in case of error
198 */
199static xmlPatternPtr
200xmlNewPattern(void) {
201 xmlPatternPtr cur;
202
203 cur = (xmlPatternPtr) xmlMalloc(sizeof(xmlPattern));
204 if (cur == NULL) {
205 ERROR(NULL, NULL, NULL,
206 "xmlNewPattern : malloc failed\n");
207 return(NULL);
208 }
209 memset(cur, 0, sizeof(xmlPattern));
210 cur->maxStep = 10;
211 cur->steps = (xmlStepOpPtr) xmlMalloc(cur->maxStep * sizeof(xmlStepOp));
212 if (cur->steps == NULL) {
213 xmlFree(cur);
214 ERROR(NULL, NULL, NULL,
215 "xmlNewPattern : malloc failed\n");
216 return(NULL);
217 }
218 return(cur);
219}
220
221/**
222 * xmlFreePattern:

Callers 1

xmlPatternCompileSafeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected