astropy/utils/xml/src/iterparse.c
/*
 * Handle the expat characterData event.
 */
Handle the expat characterData event.
Handle the expat characterData event .
static void
characterData(IterParser *self, const XML_Char *text, int len)
{
    if (PyErr_Occurred() != NULL) {
        XML_StopParser(self->parser, 0);
        return;
    }
    if (self->text_size == 0) {
        self->last_line = (unsigned long)XML_GetCurrentLineNumber(
            self->parser);
        self->last_col = (unsigned long)XML_GetCurrentColumnNumber(
            self->parser);
    }
    if (self->keep_text) {
        (void)text_append(self, text, (Py_ssize_t)len);
    }
}
static void characterData ( IterParser * self , const XML_Char * text , int len ) { if ( PyErr_Occurred ( ) != NULL ) { XML_StopParser ( self -> parser , 0 ) ; return ; } if ( self -> text_size == 0 ) { self -> last_line = ( unsigned long ) XML_GetCurrentLineNumber ( self -> parser ) ; self -> last_col = ( unsigned long ) XML_GetCurrentColumnNumber ( self -> parser ) ; } if ( self -> keep_text ) { ( void ) text_append ( self , text , ( Py_ssize_t ) len ) ; } }
Handle the expat characterData event.
Handle the expat characterData event .
/* If we've already had an error in a previous call, don't make
       things worse. */