The idea here is to avoid using stack for each CDATA section when the whole file is parsed with one call. */
| 4566 | the whole file is parsed with one call. |
| 4567 | */ |
| 4568 | static enum XML_Error PTRCALL |
| 4569 | cdataSectionProcessor(XML_Parser parser, const char *start, const char *end, |
| 4570 | const char **endPtr) { |
| 4571 | enum XML_Error result = doCdataSection( |
| 4572 | parser, parser->m_encoding, &start, end, endPtr, |
| 4573 | (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT); |
| 4574 | if (result != XML_ERROR_NONE) |
| 4575 | return result; |
| 4576 | if (start) { |
| 4577 | if (parser->m_parentParser) { /* we are parsing an external entity */ |
| 4578 | parser->m_processor = externalEntityContentProcessor; |
| 4579 | return externalEntityContentProcessor(parser, start, end, endPtr); |
| 4580 | } else { |
| 4581 | parser->m_processor = contentProcessor; |
| 4582 | return contentProcessor(parser, start, end, endPtr); |
| 4583 | } |
| 4584 | } |
| 4585 | return result; |
| 4586 | } |
| 4587 | |
| 4588 | /* startPtr gets set to non-null if the section is closed, and to null if |
| 4589 | the section is not yet closed. |
nothing calls this directly
no test coverage detected
searching dependent graphs…