* xmlXPathPopExternal: * @ctxt: an XPath parser context * * Pops an external object from the stack, handling conversion if needed. * Check error with #xmlXPathCheckError. * * Returns the object */
| 2233 | * Returns the object |
| 2234 | */ |
| 2235 | void * |
| 2236 | xmlXPathPopExternal (xmlXPathParserContextPtr ctxt) { |
| 2237 | xmlXPathObjectPtr obj; |
| 2238 | void * ret; |
| 2239 | |
| 2240 | if ((ctxt == NULL) || (ctxt->value == NULL)) { |
| 2241 | xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND); |
| 2242 | return(NULL); |
| 2243 | } |
| 2244 | if (ctxt->value->type != XPATH_USERS) { |
| 2245 | xmlXPathSetTypeError(ctxt); |
| 2246 | return(NULL); |
| 2247 | } |
| 2248 | obj = valuePop(ctxt); |
| 2249 | ret = obj->user; |
| 2250 | obj->user = NULL; |
| 2251 | xmlXPathReleaseObject(ctxt->context, obj); |
| 2252 | return(ret); |
| 2253 | } |
| 2254 | |
| 2255 | /* |
| 2256 | * Macros for accessing the content. Those should be used only by the parser, |
nothing calls this directly
no test coverage detected