* xmlXPathWrapString: * @val: the xmlChar * value * * Wraps the @val string into an XPath object. * * Returns the newly created object. * * Frees @val in case of error. */
| 4377 | * Frees @val in case of error. |
| 4378 | */ |
| 4379 | xmlXPathObjectPtr |
| 4380 | xmlXPathWrapString (xmlChar *val) { |
| 4381 | xmlXPathObjectPtr ret; |
| 4382 | |
| 4383 | ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); |
| 4384 | if (ret == NULL) { |
| 4385 | xmlFree(val); |
| 4386 | return(NULL); |
| 4387 | } |
| 4388 | memset(ret, 0 , sizeof(xmlXPathObject)); |
| 4389 | ret->type = XPATH_STRING; |
| 4390 | ret->stringval = val; |
| 4391 | return(ret); |
| 4392 | } |
| 4393 | |
| 4394 | /** |
| 4395 | * xmlXPathNewCString: |
no outgoing calls
no test coverage detected