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.35 by root, Wed Jun 6 14:52:49 2007 UTC vs.
Revision 1.36 by root, Wed Jun 6 17:27:33 2007 UTC

506 else if (SvIOKp (sv)) 506 else if (SvIOKp (sv))
507 { 507 {
508 // we assume we can always read an IV as a UV 508 // we assume we can always read an IV as a UV
509 if (SvUV (sv) & ~(UV)0x7fff) 509 if (SvUV (sv) & ~(UV)0x7fff)
510 { 510 {
511 need (enc, 32); 511 need (enc, 64);
512 enc->cur += 512 enc->cur +=
513 SvIsUV(sv) 513 SvIsUV(sv)
514 ? snprintf (enc->cur, 32, "%"UVuf, (UV)SvUVX (sv)) 514 ? snprintf (enc->cur, 64, "%"UVuf, (UV)SvUVX (sv))
515 : snprintf (enc->cur, 32, "%"IVdf, (IV)SvIVX (sv)); 515 : snprintf (enc->cur, 64, "%"IVdf, (IV)SvIVX (sv));
516 } 516 }
517 else 517 else
518 { 518 {
519 // optimise the "small number case" 519 // optimise the "small number case"
520 // code will likely be branchless and use only a single multiplication 520 // code will likely be branchless and use only a single multiplication

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines