##// END OF EJS Templates
charencode: adjust clang-format enable/disable comments...
Augie Fackler -
r36075:81199632 default
parent child Browse files
Show More
@@ -65,7 +65,6 b' static const char uppertable[128] = {'
65 '\x58', '\x59', '\x5a', /* x-z */
65 '\x58', '\x59', '\x5a', /* x-z */
66 '\x7b', '\x7c', '\x7d', '\x7e', '\x7f'
66 '\x7b', '\x7c', '\x7d', '\x7e', '\x7f'
67 };
67 };
68 /* clang-format on */
69
68
70 /* 1: no escape, 2: \<c>, 6: \u<x> */
69 /* 1: no escape, 2: \<c>, 6: \u<x> */
71 static const uint8_t jsonlentable[256] = {
70 static const uint8_t jsonlentable[256] = {
@@ -102,6 +101,7 b' static const char hexchartable[16] = {'
102 '0', '1', '2', '3', '4', '5', '6', '7',
101 '0', '1', '2', '3', '4', '5', '6', '7',
103 '8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
102 '8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
104 };
103 };
104 /* clang-format on */
105
105
106 /*
106 /*
107 * Turn a hex-encoded string into binary.
107 * Turn a hex-encoded string into binary.
@@ -25,6 +25,7 b' PyObject *asciiupper(PyObject *self, PyO'
25 PyObject *make_file_foldmap(PyObject *self, PyObject *args);
25 PyObject *make_file_foldmap(PyObject *self, PyObject *args);
26 PyObject *jsonescapeu8fast(PyObject *self, PyObject *args);
26 PyObject *jsonescapeu8fast(PyObject *self, PyObject *args);
27
27
28 /* clang-format off */
28 static const int8_t hextable[256] = {
29 static const int8_t hextable[256] = {
29 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
30 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
30 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
31 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -43,6 +44,7 b' static const int8_t hextable[256] = {'
43 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
44 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
44 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
45 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
45 };
46 };
47 /* clang-format on */
46
48
47 static inline int hexdigit(const char *p, Py_ssize_t off)
49 static inline int hexdigit(const char *p, Py_ssize_t off)
48 {
50 {
General Comments 0
You need to be logged in to leave comments. Login now