# HG changeset patch # User Siddharth Agarwal # Date 1428027452 25200 # Node ID 1c533e23ce9533d9c5556c34cbd4122f3a0161b0 # Parent f5b527024fcc90b72b3467e5c59d74ab8b1c30e7 util.h: define an enum for normcase specs These will be used in upcoming patches to efficiently create a dirstate foldmap. diff -r f5b527024fcc -r 1c533e23ce95 mercurial/encoding.py --- a/mercurial/encoding.py Thu Apr 02 19:13:50 2015 -0700 +++ b/mercurial/encoding.py Thu Apr 02 19:17:32 2015 -0700 @@ -364,7 +364,9 @@ lower: normcase lowercases ASCII strings upper: normcase uppercases ASCII strings - other: the fallback function should always be called''' + other: the fallback function should always be called + + This should be kept in sync with normcase_spec in util.h.''' lower = -1 upper = 1 other = 0 diff -r f5b527024fcc -r 1c533e23ce95 mercurial/util.h --- a/mercurial/util.h Thu Apr 02 19:13:50 2015 -0700 +++ b/mercurial/util.h Thu Apr 02 19:17:32 2015 -0700 @@ -209,6 +209,13 @@ return ret; } +/* This should be kept in sync with normcasespecs in encoding.py. */ +enum normcase_spec { + NORMCASE_LOWER = -1, + NORMCASE_UPPER = 1, + NORMCASE_OTHER = 0 +}; + #define MIN(a, b) (((a)<(b))?(a):(b)) /* VC9 doesn't include bool and lacks stdbool.h based on my searching */ #ifdef _MSC_VER