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

Function xmlXPathConvertBoolean

ThirdParty/libxml2/vtklibxml2/xpath.c:5069–5080  ·  view source on GitHub ↗

* xmlXPathConvertBoolean: * @val: an XPath object * * Converts an existing object to its boolean() equivalent * * Returns the new object, the old one is freed (or the operation * is done directly on @val) */

Source from the content-addressed store, hash-verified

5067 * is done directly on @val)
5068 */
5069xmlXPathObjectPtr
5070xmlXPathConvertBoolean(xmlXPathObjectPtr val) {
5071 xmlXPathObjectPtr ret;
5072
5073 if (val == NULL)
5074 return(xmlXPathNewBoolean(0));
5075 if (val->type == XPATH_BOOLEAN)
5076 return(val);
5077 ret = xmlXPathNewBoolean(xmlXPathCastToBoolean(val));
5078 xmlXPathFreeObject(val);
5079 return(ret);
5080}
5081
5082/************************************************************************
5083 * *

Callers

nothing calls this directly

Calls 3

xmlXPathNewBooleanFunction · 0.85
xmlXPathCastToBooleanFunction · 0.85
xmlXPathFreeObjectFunction · 0.85

Tested by

no test coverage detected