# HG changeset patch # User Matt Harbison # Date 1534899478 14400 # Node ID 42cc76d0f836d224cacb2441368cf4e546b6c47d # Parent 7a759ad2d06dcf6548a8cc19fcd773eaa943f7ac cext: fix revlog compiler error on Windows diff -r 7a759ad2d06d -r 42cc76d0f836 mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c Sun Aug 05 00:42:07 2018 -0700 +++ b/mercurial/cext/revlog.c Tue Aug 21 20:57:58 2018 -0400 @@ -1091,9 +1091,10 @@ { Py_ssize_t rev; const char *node; + Py_ssize_t length; if (!PyArg_ParseTuple(args, "n", &rev)) return NULL; - const Py_ssize_t length = index_length(self->index); + length = index_length(self->index); if (rev < 0 || rev >= length) { PyErr_SetString(PyExc_ValueError, "revlog index out of range"); return NULL;