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.134 by root, Thu Nov 15 20:13:03 2018 UTC vs.
Revision 1.135 by root, Thu Nov 15 20:49:12 2018 UTC

125} JSON; 125} JSON;
126 126
127INLINE void 127INLINE void
128json_init (JSON *json) 128json_init (JSON *json)
129{ 129{
130 Zero (json, 1, JSON); 130 static const JSON init = { F_ALLOW_NONREF, 512 };
131 json->max_depth = 512; 131
132 *json = init;
132} 133}
133 134
134///////////////////////////////////////////////////////////////////////////// 135/////////////////////////////////////////////////////////////////////////////
135// utility functions 136// utility functions
136 137
1794 else if (sv) 1795 else if (sv)
1795 { 1796 {
1796 // check for trailing garbage 1797 // check for trailing garbage
1797 decode_ws (&dec); 1798 decode_ws (&dec);
1798 1799
1799 if (*dec.cur) 1800 if (dec.cur != dec.end)
1800 { 1801 {
1801 dec.err = "garbage after JSON object"; 1802 dec.err = "garbage after JSON object";
1802 SvREFCNT_dec (sv); 1803 SvREFCNT_dec (sv);
1803 sv = 0; 1804 sv = 0;
1804 } 1805 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines