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

Function xmlXPathPopNumber

ThirdParty/libxml2/vtklibxml2/xpath.c:2147–2163  ·  view source on GitHub ↗

* xmlXPathPopNumber: * @ctxt: an XPath parser context * * Pops a number from the stack, handling conversion if needed. * Check error with #xmlXPathCheckError. * * Returns the number */

Source from the content-addressed store, hash-verified

2145 * Returns the number
2146 */
2147double
2148xmlXPathPopNumber (xmlXPathParserContextPtr ctxt) {
2149 xmlXPathObjectPtr obj;
2150 double ret;
2151
2152 obj = valuePop(ctxt);
2153 if (obj == NULL) {
2154 xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
2155 return(0);
2156 }
2157 if (obj->type != XPATH_NUMBER)
2158 ret = xmlXPathCastToNumberInternal(ctxt, obj);
2159 else
2160 ret = obj->floatval;
2161 xmlXPathReleaseObject(ctxt->context, obj);
2162 return(ret);
2163}
2164
2165/**
2166 * xmlXPathPopString:

Callers

nothing calls this directly

Calls 3

valuePopFunction · 0.85
xmlXPathReleaseObjectFunction · 0.85

Tested by

no test coverage detected