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

Function xmlXPathCompLiteral

ThirdParty/libxml2/vtklibxml2/xpath.c:9250–9266  ·  view source on GitHub ↗

* xmlXPathCompLiteral: * @ctxt: the XPath Parser context * * Parse a Literal and push it on the stack. * * [29] Literal ::= '"' [^"]* '"' * | "'" [^']* "'" * * TODO: xmlXPathCompLiteral memory allocation could be improved. */

Source from the content-addressed store, hash-verified

9248 * TODO: xmlXPathCompLiteral memory allocation could be improved.
9249 */
9250static void
9251xmlXPathCompLiteral(xmlXPathParserContextPtr ctxt) {
9252 xmlChar *ret = NULL;
9253 xmlXPathObjectPtr lit;
9254
9255 ret = xmlXPathParseLiteral(ctxt);
9256 if (ret == NULL)
9257 return;
9258 lit = xmlXPathCacheNewString(ctxt, ret);
9259 if (lit == NULL) {
9260 ctxt->error = XPATH_MEMORY_ERROR;
9261 } else if (PUSH_LONG_EXPR(XPATH_OP_VALUE, XPATH_STRING, 0, 0, lit,
9262 NULL) == -1) {
9263 xmlXPathReleaseObject(ctxt->context, lit);
9264 }
9265 xmlFree(ret);
9266}
9267
9268/**
9269 * xmlXPathCompVariableReference:

Callers 1

xmlXPathCompPrimaryExprFunction · 0.85

Calls 3

xmlXPathParseLiteralFunction · 0.85
xmlXPathCacheNewStringFunction · 0.85
xmlXPathReleaseObjectFunction · 0.85

Tested by

no test coverage detected