Patchwork D1031: util: add clang-format control comment around struct and format macro

login
register
mail settings
Submitter phabricator
Date Oct. 13, 2017, 2:05 p.m.
Message ID <2494c6003a1219b6a52fb09fe5a58a92@localhost.localdomain>
Download mbox | patch
Permalink /patch/24821/
State Not Applicable
Headers show

Comments

phabricator - Oct. 13, 2017, 2:05 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG3455e2e2ce9b: util: add clang-format control comment around struct and format macro (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1031?vs=2631&id=2673

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

AFFECTED FILES
  mercurial/cext/util.h

CHANGE DETAILS




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

Patch

diff --git a/mercurial/cext/util.h b/mercurial/cext/util.h
--- a/mercurial/cext/util.h
+++ b/mercurial/cext/util.h
@@ -14,18 +14,20 @@ 
 #define IS_PY3K
 #endif
 
+/* clang-format off */
 typedef struct {
 	PyObject_HEAD
 	char state;
 	int mode;
 	int size;
 	int mtime;
 } dirstateTupleObject;
+/* clang-format on */
 
 extern PyTypeObject dirstateTupleType;
 #define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateTupleType)
 
-#define MIN(a, b) (((a)<(b))?(a):(b))
+#define MIN(a, b) (((a) < (b)) ? (a) : (b))
 /* VC9 doesn't include bool and lacks stdbool.h based on my searching */
 #if defined(_MSC_VER) || __STDC_VERSION__ < 199901L
 #define true 1