* xmlXPathAddValues: * @ctxt: the XPath Parser context * * Implement the add operation on XPath objects: * The numeric operators convert their operands to numbers as if * by calling the number function. */
| 6425 | * by calling the number function. |
| 6426 | */ |
| 6427 | void |
| 6428 | xmlXPathAddValues(xmlXPathParserContextPtr ctxt) { |
| 6429 | xmlXPathObjectPtr arg; |
| 6430 | double val; |
| 6431 | |
| 6432 | arg = valuePop(ctxt); |
| 6433 | if (arg == NULL) |
| 6434 | XP_ERROR(XPATH_INVALID_OPERAND); |
| 6435 | val = xmlXPathCastToNumberInternal(ctxt, arg); |
| 6436 | xmlXPathReleaseObject(ctxt->context, arg); |
| 6437 | CAST_TO_NUMBER; |
| 6438 | CHECK_TYPE(XPATH_NUMBER); |
| 6439 | ctxt->value->floatval += val; |
| 6440 | } |
| 6441 | |
| 6442 | /** |
| 6443 | * xmlXPathSubValues: |
no test coverage detected