Patchwork D2180: charencode: adjust clang-format enable/disable comments

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 7:23 p.m.
Message ID <fde495563d8aa4b58aaf9599ba9308a4@localhost.localdomain>
Download mbox | patch
Permalink /patch/27676/
State Not Applicable
Headers show

Comments

phabricator - Feb. 12, 2018, 7:23 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG81199632fa42: charencode: adjust clang-format enable/disable comments (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2180?vs=5490&id=5497

REVISION DETAIL
  https://phab.mercurial-scm.org/D2180

AFFECTED FILES
  mercurial/cext/charencode.c
  mercurial/cext/charencode.h

CHANGE DETAILS




To: durin42, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/cext/charencode.h b/mercurial/cext/charencode.h
--- a/mercurial/cext/charencode.h
+++ b/mercurial/cext/charencode.h
@@ -25,6 +25,7 @@ 
 PyObject *make_file_foldmap(PyObject *self, PyObject *args);
 PyObject *jsonescapeu8fast(PyObject *self, PyObject *args);
 
+/* clang-format off */
 static const int8_t hextable[256] = {
 	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
@@ -43,6 +44,7 @@ 
 	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
 	-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
 };
+/* clang-format on */
 
 static inline int hexdigit(const char *p, Py_ssize_t off)
 {
diff --git a/mercurial/cext/charencode.c b/mercurial/cext/charencode.c
--- a/mercurial/cext/charencode.c
+++ b/mercurial/cext/charencode.c
@@ -65,7 +65,6 @@ 
 	'\x58', '\x59', '\x5a', 					/* x-z */
 				'\x7b', '\x7c', '\x7d', '\x7e', '\x7f'
 };
-/* clang-format on */
 
 /* 1: no escape, 2: \<c>, 6: \u<x> */
 static const uint8_t jsonlentable[256] = {
@@ -102,6 +101,7 @@ 
 	'0', '1', '2', '3', '4', '5', '6', '7',
 	'8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
 };
+/* clang-format on */
 
 /*
  * Turn a hex-encoded string into binary.