diff mercurial/cext/util.h @ 47948:83f0e93ec34b

dirstate-item: move the C implementation to the same logic Now that we know were we are going, we can update the C implementation. Differential Revision: https://phab.mercurial-scm.org/D11387
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 30 Aug 2021 21:18:29 +0200
parents 84391ddf4c78
children ec178161a8d1
line wrap: on
line diff
--- a/mercurial/cext/util.h	Tue Aug 31 09:23:50 2021 +0200
+++ b/mercurial/cext/util.h	Mon Aug 30 21:18:29 2021 +0200
@@ -24,13 +24,22 @@
 /* clang-format off */
 typedef struct {
 	PyObject_HEAD
-	char state;
+	char flags;
 	int mode;
 	int size;
 	int mtime;
 } dirstateItemObject;
 /* clang-format on */
 
+static const char dirstate_flag_wc_tracked = 1;
+static const char dirstate_flag_p1_tracked = 1 << 1;
+static const char dirstate_flag_p2_tracked = 1 << 2;
+static const char dirstate_flag_possibly_dirty = 1 << 3;
+static const char dirstate_flag_merged = 1 << 4;
+static const char dirstate_flag_clean_p1 = 1 << 5;
+static const char dirstate_flag_clean_p2 = 1 << 6;
+static const char dirstate_flag_rust_special = 1 << 7;
+
 extern PyTypeObject dirstateItemType;
 #define dirstate_tuple_check(op) (Py_TYPE(op) == &dirstateItemType)