changeset 34635:3455e2e2ce9b

util: add clang-format control comment around struct and format macro clang-format is not a fan of PyObject_HEAD. Differential Revision: https://phab.mercurial-scm.org/D1031
author Augie Fackler <augie@google.com>
date Wed, 04 Oct 2017 11:02:44 -0400
parents 2e08b69bcd29
children 31c6c4d27be7
files mercurial/cext/util.h
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cext/util.h	Wed Oct 04 10:57:23 2017 -0400
+++ b/mercurial/cext/util.h	Wed Oct 04 11:02:44 2017 -0400
@@ -14,6 +14,7 @@
 #define IS_PY3K
 #endif
 
+/* clang-format off */
 typedef struct {
 	PyObject_HEAD
 	char state;
@@ -21,11 +22,12 @@
 	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