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.91 by root, Mon Sep 22 07:26:26 2008 UTC vs.
Revision 1.93 by root, Mon Sep 29 03:09:27 2008 UTC

194INLINE void 194INLINE void
195need (enc_t *enc, STRLEN len) 195need (enc_t *enc, STRLEN len)
196{ 196{
197 if (expect_false (enc->cur + len >= enc->end)) 197 if (expect_false (enc->cur + len >= enc->end))
198 { 198 {
199 STRLEN cur = enc->cur - SvPVX (enc->sv); 199 STRLEN cur = enc->cur - (char *)SvPVX (enc->sv);
200 SvGROW (enc->sv, cur + len + 1); 200 SvGROW (enc->sv, cur + len + 1);
201 enc->cur = SvPVX (enc->sv) + cur; 201 enc->cur = SvPVX (enc->sv) + cur;
202 enc->end = SvPVX (enc->sv) + SvLEN (enc->sv) - 1; 202 enc->end = SvPVX (enc->sv) + SvLEN (enc->sv) - 1;
203 } 203 }
204} 204}
460 460
461 encode_ch (enc, '{'); 461 encode_ch (enc, '{');
462 462
463 // for canonical output we have to sort by keys first 463 // for canonical output we have to sort by keys first
464 // actually, this is mostly due to the stupid so-called 464 // actually, this is mostly due to the stupid so-called
465 // security workaround added somewhere in 5.8.x. 465 // security workaround added somewhere in 5.8.x
466 // that randomises hash orderings 466 // that randomises hash orderings
467 if (enc->json.flags & F_CANONICAL) 467 if (enc->json.flags & F_CANONICAL)
468 { 468 {
469 int count = hv_iterinit (hv); 469 int count = hv_iterinit (hv);
470 470

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines