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.88 by root, Sun Jun 22 12:05:49 2008 UTC vs.
Revision 1.89 by root, Sat Jul 19 04:21:32 2008 UTC

1418 1418
1419 /* work around a bug in perl 5.10, which causes SvCUR to fail an 1419 /* work around a bug in perl 5.10, which causes SvCUR to fail an
1420 * assertion with -DDEBUGGING, although SvCUR is documented to 1420 * assertion with -DDEBUGGING, although SvCUR is documented to
1421 * return the xpv_cur field which certainly exists after upgrading. 1421 * return the xpv_cur field which certainly exists after upgrading.
1422 * according to nicholas clark, calling SvPOK fixes this. 1422 * according to nicholas clark, calling SvPOK fixes this.
1423 * But it doesn't fix it, so try another workaround, call SvPV_nolen
1424 * and hope for the best.
1423 */ 1425 */
1426#ifdef DEBUGGING
1424 SvPOK (string); 1427 SvPV_nolen (string);
1428#endif
1425 1429
1426 if (SvCUR (string) > json->max_size && json->max_size) 1430 if (SvCUR (string) > json->max_size && json->max_size)
1427 croak ("attempted decode of JSON text of %lu bytes size, but max_size is set to %lu", 1431 croak ("attempted decode of JSON text of %lu bytes size, but max_size is set to %lu",
1428 (unsigned long)SvCUR (string), (unsigned long)json->max_size); 1432 (unsigned long)SvCUR (string), (unsigned long)json->max_size);
1429 1433

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines