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.143 by root, Mon Jun 21 01:04:30 2021 UTC vs.
Revision 1.144 by root, Wed Nov 9 11:47:12 2022 UTC

926 char digit, nz = 0; 926 char digit, nz = 0;
927 927
928 need (enc, 6); 928 need (enc, 6);
929 929
930 *enc->cur = '-'; enc->cur += i < 0 ? 1 : 0; 930 *enc->cur = '-'; enc->cur += i < 0 ? 1 : 0;
931 u = i < 0 ? -i : i; 931 u = i < 0 ? -i : i; // not undefined due to range check above
932 932
933 // convert to 4.28 fixed-point representation 933 // convert to 4.28 fixed-point representation
934 u = u * ((0xfffffff + 10000) / 10000); // 10**5, 5 fractional digits 934 u = u * ((0xfffffff + 10000) / 10000); // 10**5, 5 fractional digits
935 935
936 // now output digit by digit, each time masking out the integer part 936 // now output digit by digit, each time masking out the integer part

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines