* xmlXPtrNewPoint: * @node: the xmlNodePtr * @indx: the indx within the node * * Create a new xmlXPathObjectPtr of type point * * Returns the newly created object. */
| 246 | * Returns the newly created object. |
| 247 | */ |
| 248 | static xmlXPathObjectPtr |
| 249 | xmlXPtrNewPoint(xmlNodePtr node, int indx) { |
| 250 | xmlXPathObjectPtr ret; |
| 251 | |
| 252 | if (node == NULL) |
| 253 | return(NULL); |
| 254 | if (indx < 0) |
| 255 | return(NULL); |
| 256 | |
| 257 | ret = (xmlXPathObjectPtr) xmlMalloc(sizeof(xmlXPathObject)); |
| 258 | if (ret == NULL) { |
| 259 | xmlXPtrErrMemory("allocating point"); |
| 260 | return(NULL); |
| 261 | } |
| 262 | memset(ret, 0 , sizeof(xmlXPathObject)); |
| 263 | ret->type = XPATH_POINT; |
| 264 | ret->user = (void *) node; |
| 265 | ret->index = indx; |
| 266 | return(ret); |
| 267 | } |
| 268 | |
| 269 | /** |
| 270 | * xmlXPtrRangeCheckOrder: |
no test coverage detected