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

Function xmlXPathPopBoolean

ThirdParty/libxml2/vtklibxml2/xpath.c:2120–2136  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

2118 * Returns the boolean
2119 */
2120int
2121xmlXPathPopBoolean (xmlXPathParserContextPtr ctxt) {
2122 xmlXPathObjectPtr obj;
2123 int ret;
2124
2125 obj = valuePop(ctxt);
2126 if (obj == NULL) {
2127 xmlXPathSetError(ctxt, XPATH_INVALID_OPERAND);
2128 return(0);
2129 }
2130 if (obj->type != XPATH_BOOLEAN)
2131 ret = xmlXPathCastToBoolean(obj);
2132 else
2133 ret = obj->boolval;
2134 xmlXPathReleaseObject(ctxt->context, obj);
2135 return(ret);
2136}
2137
2138/**
2139 * xmlXPathPopNumber:

Callers 1

Calls 3

valuePopFunction · 0.85
xmlXPathCastToBooleanFunction · 0.85
xmlXPathReleaseObjectFunction · 0.85

Tested by

no test coverage detected