# HG changeset patch # User Gregory Szorc # Date 2019-04-04 22:18:06 # Node ID b01bbb8ff1f21ef4f469ec3486b623c0b8e449cc # Parent 65ed223619ec8e5f4e7231fe62ec6675f2464c76 cext: make revlog.c PY_SSIZE_T_CLEAN Without this, Python 3.8 emits a deprecation warning, as using int for # values is deprecated. Many existing modules use PY_SSIZE_T_CLEAN, so this shouldn't be contentious. I audited the file for all # formatters and verified we are using Py_ssize_t everywhere now. Differential Revision: https://phab.mercurial-scm.org/D6196 diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c --- a/mercurial/cext/revlog.c +++ b/mercurial/cext/revlog.c @@ -7,6 +7,7 @@ the GNU General Public License, incorporated herein by reference. */ +#define PY_SSIZE_T_CLEAN #include #include #include @@ -1947,7 +1948,7 @@ static int index_populate_nt(indexObject static PyObject *index_partialmatch(indexObject *self, PyObject *args) { const char *fullnode; - int nodelen; + Py_ssize_t nodelen; char *node; int rev, i;