Lines Matching +defs:val +defs:obj
601 * @val: an initial xmlXPathObjectPtr, or NULL
603 * Create a new xmlLocationSetPtr of type double and of value @val
608 xmlXPtrLocationSetCreate(xmlXPathObjectPtr val) {
617 if (val != NULL) {
628 ret->locTab[ret->locNr++] = val;
636 * @val: a new xmlXPathObjectPtr
639 * If the location already exist in the set @val is freed.
642 xmlXPtrLocationSetAdd(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
645 if ((cur == NULL) || (val == NULL)) return;
651 if (xmlXPtrRangesEqual(cur->locTab[i], val)) {
652 xmlXPathFreeObject(val);
682 cur->locTab[cur->locNr++] = val;
715 * @val: an xmlXPathObjectPtr
720 xmlXPtrLocationSetDel(xmlLocationSetPtr cur, xmlXPathObjectPtr val) {
724 if (val == NULL) return;
730 if (cur->locTab[i] == val) break;
748 * @val: the index to remove
753 xmlXPtrLocationSetRemove(xmlLocationSetPtr cur, int val) {
755 if (val >= cur->locNr) return;
757 for (;val < cur->locNr;val++)
758 cur->locTab[val] = cur->locTab[val + 1];
764 * @obj: the xmlLocationSetPtr to free
769 xmlXPtrFreeLocationSet(xmlLocationSetPtr obj) {
772 if (obj == NULL) return;
773 if (obj->locTab != NULL) {
774 for (i = 0;i < obj->locNr; i++) {
775 xmlXPathFreeObject(obj->locTab[i]);
777 xmlFree(obj->locTab);
779 xmlFree(obj);
849 * @val: the LocationSet value
851 * Wrap the LocationSet @val in a new xmlXPathObjectPtr
856 xmlXPtrWrapLocationSet(xmlLocationSetPtr val) {
866 ret->user = (void *) val;
902 #define SKIP(val) ctxt->cur += (val)
903 #define NXT(val) ctxt->cur[(val)]
923 xmlXPathObjectPtr obj;
927 obj = valuePop(ctxt);
928 oldset = obj->nodesetval;
930 xmlXPathFreeObject(obj);
936 xmlXPathFreeObject(obj);
941 valuePush(ctxt, obj);
1159 xmlXPathObjectPtr obj = ctxt->value;
1161 switch (obj->type) {
1183 obj = valuePop(ctxt);
1184 if (obj != NULL) {
1185 xmlXPathFreeObject(obj);
1187 } while (obj != NULL);
1587 * @obj: the XPointer result from the evaluation.
1596 xmlXPtrBuildNodeList(xmlXPathObjectPtr obj) {
1600 if (obj == NULL)
1602 switch (obj->type) {
1604 xmlNodeSetPtr set = obj->nodesetval;
1648 xmlLocationSetPtr set = (xmlLocationSetPtr) obj->user;
1665 return(xmlXPtrBuildRangeNodeList(obj));
1667 return(xmlCopyNode(obj->user, 0));
1782 xmlXPathObjectPtr tmp, obj, point;
1792 obj = valuePop(ctxt);
1793 if (obj->type == XPATH_NODESET) {
1797 tmp = xmlXPtrNewLocationSetNodeSet(obj->nodesetval);
1798 xmlXPathFreeObject(obj);
1799 obj = tmp;
1804 xmlXPathFreeObject(obj);
1807 oldset = (xmlLocationSetPtr) obj->user;
1825 xmlXPathFreeObject(obj);
1835 xmlXPathFreeObject(obj);
1845 xmlXPathFreeObject(obj);
1876 xmlXPathObjectPtr tmp, obj, point;
1886 obj = valuePop(ctxt);
1887 if (obj->type == XPATH_NODESET) {
1891 tmp = xmlXPtrNewLocationSetNodeSet(obj->nodesetval);
1892 xmlXPathFreeObject(obj);
1893 obj = tmp;
1897 oldset = (xmlLocationSetPtr) obj->user;
1915 xmlXPathFreeObject(obj);
1928 xmlXPathFreeObject(obj);
1938 xmlXPathFreeObject(obj);
2218 xmlXPathObjectPtr res, obj;
2231 obj = valuePop(ctxt);
2232 oldset = obj->nodesetval;
2278 xmlXPathFreeObject(obj);
2648 * @obj: an range
2657 xmlXPtrGetStartPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
2658 if ((obj == NULL) || (node == NULL) || (indx == NULL))
2661 switch (obj->type) {
2663 *node = obj->user;
2664 if (obj->index <= 0)
2667 *indx = obj->index;
2670 *node = obj->user;
2671 if (obj->index <= 0)
2674 *indx = obj->index;
2684 * @obj: an range
2693 xmlXPtrGetEndPoint(xmlXPathObjectPtr obj, xmlNodePtr *node, int *indx) {
2694 if ((obj == NULL) || (node == NULL) || (indx == NULL))
2697 switch (obj->type) {
2699 *node = obj->user;
2700 if (obj->index <= 0)
2703 *indx = obj->index;
2706 *node = obj->user;
2707 if (obj->index <= 0)
2710 *indx = obj->index;
2897 xmlXPathObjectPtr obj, tmp;
2917 obj = valuePop(ctxt);
2918 oldset = obj->user;
2928 valuePush(ctxt, obj);
2980 xmlXPathFreeObject(obj);