* valuePop: * @ctxt: an XPath evaluation context * * Pops the top XPath object from the value stack * * Returns the XPath object just removed */
| 2045 | * Returns the XPath object just removed |
| 2046 | */ |
| 2047 | xmlXPathObjectPtr |
| 2048 | valuePop(xmlXPathParserContextPtr ctxt) |
| 2049 | { |
| 2050 | xmlXPathObjectPtr ret; |
| 2051 | |
| 2052 | if ((ctxt == NULL) || (ctxt->valueNr <= 0)) |
| 2053 | return (NULL); |
| 2054 | |
| 2055 | ctxt->valueNr--; |
| 2056 | if (ctxt->valueNr > 0) |
| 2057 | ctxt->value = ctxt->valueTab[ctxt->valueNr - 1]; |
| 2058 | else |
| 2059 | ctxt->value = NULL; |
| 2060 | ret = ctxt->valueTab[ctxt->valueNr]; |
| 2061 | ctxt->valueTab[ctxt->valueNr] = NULL; |
| 2062 | return (ret); |
| 2063 | } |
| 2064 | /** |
| 2065 | * valuePush: |
| 2066 | * @ctxt: an XPath evaluation context |
no outgoing calls
no test coverage detected