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.112 by root, Thu Aug 11 17:06:53 2011 UTC vs.
Revision 1.113 by root, Thu Aug 11 21:37:41 2011 UTC

837 encode_rv (enc, SvRV (sv)); 837 encode_rv (enc, SvRV (sv));
838 else if (!SvOK (sv) || enc->json.flags & F_ALLOW_UNKNOWN) 838 else if (!SvOK (sv) || enc->json.flags & F_ALLOW_UNKNOWN)
839 encode_str (enc, "null", 4, 0); 839 encode_str (enc, "null", 4, 0);
840 else 840 else
841 croak ("encountered perl type (%s,0x%x) that JSON cannot handle, you might want to report this", 841 croak ("encountered perl type (%s,0x%x) that JSON cannot handle, you might want to report this",
842 SvPV_nolen (sv), SvFLAGS (sv)); 842 SvPV_nolen (sv), (unsigned int)SvFLAGS (sv));
843} 843}
844 844
845static SV * 845static SV *
846encode_json (SV *scalar, JSON *json) 846encode_json (SV *scalar, JSON *json)
847{ 847{
1605 pv_uni_display (uni, dec.cur, dec.end - dec.cur, 20, UNI_DISPLAY_QQ); 1605 pv_uni_display (uni, dec.cur, dec.end - dec.cur, 20, UNI_DISPLAY_QQ);
1606 LEAVE; 1606 LEAVE;
1607 1607
1608 croak ("%s, at character offset %d (before \"%s\")", 1608 croak ("%s, at character offset %d (before \"%s\")",
1609 dec.err, 1609 dec.err,
1610 ptr_to_index (string, dec.cur), 1610 (int)ptr_to_index (string, dec.cur),
1611 dec.cur != dec.end ? SvPV_nolen (uni) : "(end of string)"); 1611 dec.cur != dec.end ? SvPV_nolen (uni) : "(end of string)");
1612 } 1612 }
1613 1613
1614 sv = sv_2mortal (sv); 1614 sv = sv_2mortal (sv);
1615 1615

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines