* xmlXPathPopString: * @ctxt: an XPath parser context * * Pops a string from the stack, handling conversion if needed. * Check error with #xmlXPathCheckError. * * Returns the string */
| 2172 | * Returns the string |
| 2173 | */ |
| 2174 | xmlChar * |
| 2175 | xmlXPathPopString (xmlXPathParserContextPtr ctxt) { |
| 2176 | xmlXPathObjectPtr obj; |
| 2177 | xmlChar * ret; |
| 2178 | |
| 2179 | obj = valuePop(ctxt); |
| 2180 | if (obj == NULL) { |
| 2181 | xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND); |
| 2182 | return(NULL); |
| 2183 | } |
| 2184 | ret = xmlXPathCastToString(obj); |
| 2185 | if (ret == NULL) |
| 2186 | xmlXPathPErrMemory(ctxt); |
| 2187 | xmlXPathReleaseObject(ctxt->context, obj); |
| 2188 | return(ret); |
| 2189 | } |
| 2190 | |
| 2191 | /** |
| 2192 | * xmlXPathPopNodeSet: |
nothing calls this directly
no test coverage detected