* xmlXPathLastFunction: * @ctxt: the XPath Parser context * @nargs: the number of arguments * * Implement the last() XPath function * number last() * The last function returns the number of nodes in the context node list. */
| 7424 | * The last function returns the number of nodes in the context node list. |
| 7425 | */ |
| 7426 | void |
| 7427 | xmlXPathLastFunction(xmlXPathParserContextPtr ctxt, int nargs) { |
| 7428 | CHECK_ARITY(0); |
| 7429 | if (ctxt->context->contextSize >= 0) { |
| 7430 | valuePush(ctxt, |
| 7431 | xmlXPathCacheNewFloat(ctxt, (double) ctxt->context->contextSize)); |
| 7432 | } else { |
| 7433 | XP_ERROR(XPATH_INVALID_CTXT_SIZE); |
| 7434 | } |
| 7435 | } |
| 7436 | |
| 7437 | /** |
| 7438 | * xmlXPathPositionFunction: |
nothing calls this directly
no test coverage detected