… | |
… | |
1992 | if (self->incr_pos > self->max_size && self->max_size) |
1992 | if (self->incr_pos > self->max_size && self->max_size) |
1993 | croak ("attempted decode of JSON text of %lu bytes size, but max_size is set to %lu", |
1993 | croak ("attempted decode of JSON text of %lu bytes size, but max_size is set to %lu", |
1994 | (unsigned long)self->incr_pos, (unsigned long)self->max_size); |
1994 | (unsigned long)self->incr_pos, (unsigned long)self->max_size); |
1995 | |
1995 | |
1996 | if (!INCR_DONE (self)) |
1996 | if (!INCR_DONE (self)) |
|
|
1997 | { |
|
|
1998 | // as an optimisation, do not accumulate white space in the incr buffer |
|
|
1999 | if (self->incr_mode == INCR_M_WS) |
|
|
2000 | SvCUR_set (self->incr_text, 0); |
|
|
2001 | |
1997 | break; |
2002 | break; |
|
|
2003 | } |
1998 | } |
2004 | } |
1999 | |
2005 | |
2000 | XPUSHs (decode_json (self->incr_text, self, &offset)); |
2006 | XPUSHs (decode_json (self->incr_text, self, &offset)); |
2001 | |
2007 | |
2002 | self->incr_pos -= offset - SvPVX (self->incr_text); |
2008 | self->incr_pos -= offset - SvPVX (self->incr_text); |