ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/JSON-XS/XS.xs
(Generate patch)

Comparing JSON-XS/XS.xs (file contents):
Revision 1.109 by root, Tue Mar 8 10:18:50 2011 UTC vs.
Revision 1.112 by root, Thu Aug 11 17:06:53 2011 UTC

260 } 260 }
261 261
262 // this relies greatly on the quality of the pow () 262 // this relies greatly on the quality of the pow ()
263 // implementation of the platform, but a good 263 // implementation of the platform, but a good
264 // implementation is hard to beat. 264 // implementation is hard to beat.
265 // (IEEE 754 conformant ones are required to be exact)
265 if (postdp) *expo -= eaccum; 266 if (postdp) *expo -= eaccum;
266 *accum += uaccum * Perl_pow (10., *expo); 267 *accum += uaccum * Perl_pow (10., *expo);
267 *expo += eaccum; 268 *expo += eaccum;
268} 269}
269 270
1991 if (self->incr_pos > self->max_size && self->max_size) 1992 if (self->incr_pos > self->max_size && self->max_size)
1992 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",
1993 (unsigned long)self->incr_pos, (unsigned long)self->max_size); 1994 (unsigned long)self->incr_pos, (unsigned long)self->max_size);
1994 1995
1995 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 && self->incr_pos)
2000 {
2001 self->incr_pos = 0;
2002 SvCUR_set (self->incr_text, 0);
2003 }
2004
1996 break; 2005 break;
2006 }
1997 } 2007 }
1998 2008
1999 XPUSHs (decode_json (self->incr_text, self, &offset)); 2009 XPUSHs (decode_json (self->incr_text, self, &offset));
2000 2010
2001 self->incr_pos -= offset - SvPVX (self->incr_text); 2011 self->incr_pos -= offset - SvPVX (self->incr_text);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines