* xmlXPathNewNodeSetList: * @val: an existing NodeSet * * Create a new xmlXPathObjectPtr of type NodeSet and initialize * it with the Nodeset @val * * Returns the newly created object. */
| 3435 | * Returns the newly created object. |
| 3436 | */ |
| 3437 | xmlXPathObjectPtr |
| 3438 | xmlXPathNewNodeSetList(xmlNodeSetPtr val) |
| 3439 | { |
| 3440 | xmlXPathObjectPtr ret; |
| 3441 | |
| 3442 | if (val == NULL) |
| 3443 | ret = NULL; |
| 3444 | else if (val->nodeTab == NULL) |
| 3445 | ret = xmlXPathNewNodeSet(NULL); |
| 3446 | else { |
| 3447 | ret = xmlXPathNewNodeSet(val->nodeTab[0]); |
| 3448 | if (ret) { |
| 3449 | ret->nodesetval = xmlXPathNodeSetMerge(NULL, val); |
| 3450 | if (ret->nodesetval == NULL) { |
| 3451 | xmlFree(ret); |
| 3452 | return(NULL); |
| 3453 | } |
| 3454 | } |
| 3455 | } |
| 3456 | |
| 3457 | return (ret); |
| 3458 | } |
| 3459 | |
| 3460 | /** |
| 3461 | * xmlXPathWrapNodeSet: |
nothing calls this directly
no test coverage detected