21 * supported and proper types are used in the extensions themselves. */ |
21 * supported and proper types are used in the extensions themselves. */ |
22 #define PyInt_Type PyLong_Type |
22 #define PyInt_Type PyLong_Type |
23 #define PyInt_AS_LONG PyLong_AS_LONG |
23 #define PyInt_AS_LONG PyLong_AS_LONG |
24 #endif |
24 #endif |
25 |
25 |
|
26 /* clang-format off */ |
26 static const char lowertable[128] = { |
27 static const char lowertable[128] = { |
27 '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', |
28 '\x00', '\x01', '\x02', '\x03', '\x04', '\x05', '\x06', '\x07', |
28 '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', |
29 '\x08', '\x09', '\x0a', '\x0b', '\x0c', '\x0d', '\x0e', '\x0f', |
29 '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', |
30 '\x10', '\x11', '\x12', '\x13', '\x14', '\x15', '\x16', '\x17', |
30 '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', |
31 '\x18', '\x19', '\x1a', '\x1b', '\x1c', '\x1d', '\x1e', '\x1f', |
62 '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', /* h-o */ |
63 '\x48', '\x49', '\x4a', '\x4b', '\x4c', '\x4d', '\x4e', '\x4f', /* h-o */ |
63 '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', /* p-w */ |
64 '\x50', '\x51', '\x52', '\x53', '\x54', '\x55', '\x56', '\x57', /* p-w */ |
64 '\x58', '\x59', '\x5a', /* x-z */ |
65 '\x58', '\x59', '\x5a', /* x-z */ |
65 '\x7b', '\x7c', '\x7d', '\x7e', '\x7f' |
66 '\x7b', '\x7c', '\x7d', '\x7e', '\x7f' |
66 }; |
67 }; |
|
68 /* clang-format on */ |
67 |
69 |
68 /* 1: no escape, 2: \<c>, 6: \u<x> */ |
70 /* 1: no escape, 2: \<c>, 6: \u<x> */ |
69 static const uint8_t jsonlentable[256] = { |
71 static const uint8_t jsonlentable[256] = { |
70 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 6, 2, 2, 6, 6, /* b, t, n, f, r */ |
72 6, 6, 6, 6, 6, 6, 6, 6, 2, 2, 2, 6, 2, 2, 6, 6, /* b, t, n, f, r */ |
71 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
73 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |