D1031: util: add clang-format control comment around struct and format macro
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Oct 12 15:10:02 UTC 2017
durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
clang-format is not a fan of PyObject_HEAD.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1031
AFFECTED FILES
mercurial/cext/util.h
CHANGE DETAILS
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
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list