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.97 by root, Fri Jul 3 09:38:30 2009 UTC vs.
Revision 1.99 by root, Sat Aug 8 10:06:02 2009 UTC

12#if defined(__BORLANDC__) || defined(_MSC_VER) 12#if defined(__BORLANDC__) || defined(_MSC_VER)
13# define snprintf _snprintf // C compilers have this in stdio.h 13# define snprintf _snprintf // C compilers have this in stdio.h
14#endif 14#endif
15 15
16// some old perls do not have this, try to make it work, no 16// some old perls do not have this, try to make it work, no
17// guarentees, though. if it breaks, you get to keep the pieces. 17// guarantees, though. if it breaks, you get to keep the pieces.
18#ifndef UTF8_MAXBYTES 18#ifndef UTF8_MAXBYTES
19# define UTF8_MAXBYTES 13 19# define UTF8_MAXBYTES 13
20#endif 20#endif
21 21
22#define IVUV_MAXCHARS (sizeof (UV) * CHAR_BIT * 28 / 93 + 2) 22#define IVUV_MAXCHARS (sizeof (UV) * CHAR_BIT * 28 / 93 + 2)
471 471
472 // for canonical output we have to sort by keys first 472 // for canonical output we have to sort by keys first
473 // actually, this is mostly due to the stupid so-called 473 // actually, this is mostly due to the stupid so-called
474 // security workaround added somewhere in 5.8.x 474 // security workaround added somewhere in 5.8.x
475 // that randomises hash orderings 475 // that randomises hash orderings
476 if (enc->json.flags & F_CANONICAL) 476 if (enc->json.flags & F_CANONICAL && !SvRMAGICAL (hv))
477 { 477 {
478 int count = hv_iterinit (hv); 478 int count = hv_iterinit (hv);
479 479
480 if (SvMAGICAL (hv)) 480 if (SvMAGICAL (hv))
481 { 481 {
1655 json_stash = gv_stashpv ("JSON::XS" , 1); 1655 json_stash = gv_stashpv ("JSON::XS" , 1);
1656 json_boolean_stash = gv_stashpv ("JSON::XS::Boolean", 1); 1656 json_boolean_stash = gv_stashpv ("JSON::XS::Boolean", 1);
1657 1657
1658 json_true = get_bool ("JSON::XS::true"); 1658 json_true = get_bool ("JSON::XS::true");
1659 json_false = get_bool ("JSON::XS::false"); 1659 json_false = get_bool ("JSON::XS::false");
1660
1661 CvNODEBUG_on (get_cv ("JSON::XS::incr_text", 0)); /* the debugger completely breaks lvalue subs */
1660} 1662}
1661 1663
1662PROTOTYPES: DISABLE 1664PROTOTYPES: DISABLE
1663 1665
1664void CLONE (...) 1666void CLONE (...)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines