* xmlXPathNodeSetClearFromPos: * @set: the node set to be cleared * @pos: the start position to clear from * * Clears the list from temporary XPath objects (e.g. namespace nodes * are feed) starting with the entry at @pos, but does *not* free the list * itself. Sets the length of the list to @pos. */
| 3318 | * itself. Sets the length of the list to @pos. |
| 3319 | */ |
| 3320 | static void |
| 3321 | xmlXPathNodeSetClearFromPos(xmlNodeSetPtr set, int pos, int hasNsNodes) |
| 3322 | { |
| 3323 | if ((set == NULL) || (pos >= set->nodeNr)) |
| 3324 | return; |
| 3325 | else if ((hasNsNodes)) { |
| 3326 | int i; |
| 3327 | xmlNodePtr node; |
| 3328 | |
| 3329 | for (i = pos; i < set->nodeNr; i++) { |
| 3330 | node = set->nodeTab[i]; |
| 3331 | if ((node != NULL) && |
| 3332 | (node->type == XML_NAMESPACE_DECL)) |
| 3333 | xmlXPathNodeSetFreeNs((xmlNsPtr) node); |
| 3334 | } |
| 3335 | } |
| 3336 | set->nodeNr = pos; |
| 3337 | } |
| 3338 | |
| 3339 | /** |
| 3340 | * xmlXPathNodeSetClear: |
no test coverage detected