* xmlXPtrWrapLocationSet: * @val: the LocationSet value * * Wrap the LocationSet @val in a new xmlXPathObjectPtr * * Returns the newly created object. */
| 815 | * Returns the newly created object. |
| 816 | */ |
| 817 | xmlXPathObjectPtr |
| 818 | xmlXPtrWrapLocationSet(xmlLocationSetPtr val) { |
| 819 | xmlXPathObjectPtr ret; |
| 820 | |
| 821 | ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); |
| 822 | if (ret == NULL) { |
| 823 | xmlXPtrErrMemory("allocating locationset"); |
| 824 | return(NULL); |
| 825 | } |
| 826 | memset(ret, 0, sizeof(xmlXPathObject)); |
| 827 | ret->type = XPATH_LOCATIONSET; |
| 828 | ret->user = (void *) val; |
| 829 | return(ret); |
| 830 | } |
| 831 | #endif /* LIBXML_XPTR_LOCS_ENABLED */ |
| 832 | |
| 833 | /************************************************************************ |
no test coverage detected