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.9 by root, Fri Mar 23 17:40:29 2007 UTC vs.
Revision 1.10 by root, Sat Mar 24 01:15:22 2007 UTC

10#define F_UTF8 0x00000002 10#define F_UTF8 0x00000002
11#define F_INDENT 0x00000004 11#define F_INDENT 0x00000004
12#define F_CANONICAL 0x00000008 12#define F_CANONICAL 0x00000008
13#define F_SPACE_BEFORE 0x00000010 13#define F_SPACE_BEFORE 0x00000010
14#define F_SPACE_AFTER 0x00000020 14#define F_SPACE_AFTER 0x00000020
15#define F_JSON_RPC 0x00000040
16#define F_ALLOW_NONREF 0x00000080 15#define F_ALLOW_NONREF 0x00000080
17#define F_SHRINK 0x00000100 16#define F_SHRINK 0x00000100
18 17
19#define F_PRETTY F_INDENT | F_SPACE_BEFORE | F_SPACE_AFTER 18#define F_PRETTY F_INDENT | F_SPACE_BEFORE | F_SPACE_AFTER
20#define F_DEFAULT 0 19#define F_DEFAULT 0
150 { 149 {
151 if (uch > 0xFFFFUL) 150 if (uch > 0xFFFFUL)
152 { 151 {
153 need (enc, len += 11); 152 need (enc, len += 11);
154 sprintf (enc->cur, "\\u%04x\\u%04x", 153 sprintf (enc->cur, "\\u%04x\\u%04x",
155 (uch - 0x10000) / 0x400 + 0xD800, 154 (int)((uch - 0x10000) / 0x400 + 0xD800),
156 (uch - 0x10000) % 0x400 + 0xDC00); 155 (int)((uch - 0x10000) % 0x400 + 0xDC00));
157 enc->cur += 12; 156 enc->cur += 12;
158 } 157 }
159 else 158 else
160 { 159 {
161 static char hexdigit [16] = "0123456789abcdef"; 160 static char hexdigit [16] = "0123456789abcdef";
946 utf8 = F_UTF8 945 utf8 = F_UTF8
947 indent = F_INDENT 946 indent = F_INDENT
948 canonical = F_CANONICAL 947 canonical = F_CANONICAL
949 space_before = F_SPACE_BEFORE 948 space_before = F_SPACE_BEFORE
950 space_after = F_SPACE_AFTER 949 space_after = F_SPACE_AFTER
951 json_rpc = F_JSON_RPC
952 pretty = F_PRETTY 950 pretty = F_PRETTY
953 allow_nonref = F_ALLOW_NONREF 951 allow_nonref = F_ALLOW_NONREF
954 shrink = F_SHRINK 952 shrink = F_SHRINK
955 CODE: 953 CODE:
956{ 954{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines