From patchwork Thu Sep 12 06:35:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: parsers: use char instead of int8_t From: elson.wei@gmail.com X-Patchwork-Id: 2429 Message-Id: <323830f2c65ece0e6111.1378967758@ElsonWei-NB.PrimeVOLT> To: mercurial-devel@selenic.com Date: Thu, 12 Sep 2013 14:35:58 +0800 # HG changeset patch # User Wei, Elson # Date 1378967736 -28800 # Thu Sep 12 14:35:36 2013 +0800 # Node ID 323830f2c65ece0e6111aae2b11d219d23b68d12 # Parent d69e06724b96a985f29fd493a5dfe356a75af387 parsers: use char instead of int8_t MS Windows SDK v7.0 doesn't have stdint.h in which int8_t is defined. For compatibility, changes the type of "hextable" back to char[]. diff --git a/mercurial/parsers.c b/mercurial/parsers.c --- a/mercurial/parsers.c +++ b/mercurial/parsers.c @@ -14,7 +14,7 @@ #include "util.h" -static int8_t hextable[256] = { +static char hextable[256] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, @@ -35,7 +35,7 @@ static inline int hexdigit(const char *p, Py_ssize_t off) { - int8_t val = hextable[(unsigned char)p[off]]; + char val = hextable[(unsigned char)p[off]]; if (val >= 0) { return val;