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.117 by root, Fri Oct 25 20:19:57 2013 UTC vs.
Revision 1.118 by root, Fri Oct 25 20:27:57 2013 UTC

2071 SvREFCNT_dec (self->incr_text); 2071 SvREFCNT_dec (self->incr_text);
2072 2072
2073PROTOTYPES: ENABLE 2073PROTOTYPES: ENABLE
2074 2074
2075void encode_json (SV *scalar) 2075void encode_json (SV *scalar)
2076 ALIAS:
2077 to_json_ = 0
2078 encode_json = F_UTF8
2079 PPCODE: 2076 PPCODE:
2080{ 2077{
2081 JSON json; 2078 JSON json;
2082 json_init (&json); 2079 json_init (&json);
2083 json.flags |= ix; 2080 json.flags |= F_UTF8;
2084 PUTBACK; scalar = encode_json (scalar, &json); SPAGAIN; 2081 PUTBACK; scalar = encode_json (scalar, &json); SPAGAIN;
2085 XPUSHs (scalar); 2082 XPUSHs (scalar);
2086} 2083}
2087 2084
2088void decode_json (SV *jsonstr) 2085void decode_json (SV *jsonstr)
2089 ALIAS:
2090 from_json_ = 0
2091 decode_json = F_UTF8
2092 PPCODE: 2086 PPCODE:
2093{ 2087{
2094 JSON json; 2088 JSON json;
2095 json_init (&json); 2089 json_init (&json);
2096 json.flags |= ix; 2090 json.flags |= F_UTF8;
2097 PUTBACK; jsonstr = decode_json (jsonstr, &json, 0); SPAGAIN; 2091 PUTBACK; jsonstr = decode_json (jsonstr, &json, 0); SPAGAIN;
2098 XPUSHs (jsonstr); 2092 XPUSHs (jsonstr);
2099} 2093}
2100 2094

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines