The idea here is to avoid using stack for each CDATA section when the whole file is parsed with one call. */
| 3988 | the whole file is parsed with one call. |
| 3989 | */ |
| 3990 | static enum XML_Error PTRCALL |
| 3991 | cdataSectionProcessor(XML_Parser parser, const char *start, const char *end, |
| 3992 | const char **endPtr) { |
| 3993 | enum XML_Error result = doCdataSection( |
| 3994 | parser, parser->m_encoding, &start, end, endPtr, |
| 3995 | (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT); |
| 3996 | if (result != XML_ERROR_NONE) |
| 3997 | return result; |
| 3998 | if (start) { |
| 3999 | if (parser->m_parentParser) { /* we are parsing an external entity */ |
| 4000 | parser->m_processor = externalEntityContentProcessor; |
| 4001 | return externalEntityContentProcessor(parser, start, end, endPtr); |
| 4002 | } else { |
| 4003 | parser->m_processor = contentProcessor; |
| 4004 | return contentProcessor(parser, start, end, endPtr); |
| 4005 | } |
| 4006 | } |
| 4007 | return result; |
| 4008 | } |
| 4009 | |
| 4010 | /* startPtr gets set to non-null if the section is closed, and to null if |
| 4011 | the section is not yet closed. |
nothing calls this directly
no test coverage detected