* xmlNewPattern: * * Create a new XSLT Pattern * * Returns the newly allocated xmlPatternPtr or NULL in case of error */
| 197 | * Returns the newly allocated xmlPatternPtr or NULL in case of error |
| 198 | */ |
| 199 | static xmlPatternPtr |
| 200 | xmlNewPattern(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: |
no outgoing calls
no test coverage detected