# HG changeset patch # User Augie Fackler # Date 2017-10-04 15:02:44 # Node ID 3455e2e2ce9b28e8c1db2a682400034687deeb6a # Parent 2e08b69bcd29ecbb8f49837c5c7f674d3962153a 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 diff --git a/mercurial/cext/util.h b/mercurial/cext/util.h --- a/mercurial/cext/util.h +++ b/mercurial/cext/util.h @@ -14,6 +14,7 @@ #define IS_PY3K #endif +/* clang-format off */ typedef struct { PyObject_HEAD char state; @@ -21,11 +22,12 @@ typedef struct { 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