* xmlXPtrNewLocationSetNodes: * @start: the start NodePtr value * @end: the end NodePtr value or NULL * * Create a new xmlXPathObjectPtr of type LocationSet and initialize * it with the single range made of the two nodes @start and @end * * Returns the newly created object. */
| 752 | * Returns the newly created object. |
| 753 | */ |
| 754 | xmlXPathObjectPtr |
| 755 | xmlXPtrNewLocationSetNodes(xmlNodePtr start, xmlNodePtr end) { |
| 756 | xmlXPathObjectPtr ret; |
| 757 | |
| 758 | ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); |
| 759 | if (ret == NULL) { |
| 760 | xmlXPtrErrMemory("allocating locationset"); |
| 761 | return(NULL); |
| 762 | } |
| 763 | memset(ret, 0 , sizeof(xmlXPathObject)); |
| 764 | ret->type = XPATH_LOCATIONSET; |
| 765 | if (end == NULL) |
| 766 | ret->user = xmlXPtrLocationSetCreate(xmlXPtrNewCollapsedRange(start)); |
| 767 | else |
| 768 | ret->user = xmlXPtrLocationSetCreate(xmlXPtrNewRangeNodes(start,end)); |
| 769 | return(ret); |
| 770 | } |
| 771 | |
| 772 | /** |
| 773 | * xmlXPtrNewLocationSetNodeSet: |
no test coverage detected