MCPcopy Create free account
hub / github.com/Kitware/VTK / xmlXPathLastFunction

Function xmlXPathLastFunction

ThirdParty/libxml2/vtklibxml2/xpath.c:7426–7435  ·  view source on GitHub ↗

* 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. */

Source from the content-addressed store, hash-verified

7424 * The last function returns the number of nodes in the context node list.
7425 */
7426void
7427xmlXPathLastFunction(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:

Callers

nothing calls this directly

Calls 2

valuePushFunction · 0.85
xmlXPathCacheNewFloatFunction · 0.85

Tested by

no test coverage detected