comparison mercurial/cext/charencode.h @ 36058:81199632fa42

charencode: adjust clang-format enable/disable comments We're pretty close to being able to let clang-format manage most of these files. Differential Revision: https://phab.mercurial-scm.org/D2180
author Augie Fackler <augie@google.com>
date Mon, 12 Feb 2018 10:36:59 -0500
parents f4433f2713d0
children
comparison
equal deleted inserted replaced
36057:7f8338b87c88 36058:81199632fa42
23 PyObject *asciilower(PyObject *self, PyObject *args); 23 PyObject *asciilower(PyObject *self, PyObject *args);
24 PyObject *asciiupper(PyObject *self, PyObject *args); 24 PyObject *asciiupper(PyObject *self, PyObject *args);
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,
31 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 32 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
32 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0-9 */ 33 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, /* 0-9 */
41 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 42 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
42 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 43 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
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 {
49 int8_t val = hextable[(unsigned char)p[off]]; 51 int8_t val = hextable[(unsigned char)p[off]];
50 52