# HG changeset patch # User Julien Cristau # Date 2018-05-12 20:29:28 # Node ID 273ea09f65500ea7936afe2983bf6a126c5bf4e6 # Parent edb28a6d95b73079a7dd6f8cf0486a8e5a3d9fac bdiff: fix yet more fallout from xdiff long/int64 conversion (issue5885) "l" in Py_BuildValue's format string means long, so passing int64_t instead results in fireworks on 32bit architectures. Differential Revision: https://phab.mercurial-scm.org/D3538 diff --git a/mercurial/cext/bdiff.c b/mercurial/cext/bdiff.c --- a/mercurial/cext/bdiff.c +++ b/mercurial/cext/bdiff.c @@ -261,7 +261,7 @@ static int hunk_consumer(int64_t a1, int void *priv) { PyObject *rl = (PyObject *)priv; - PyObject *m = Py_BuildValue("llll", a1, a2, b1, b2); + PyObject *m = Py_BuildValue("LLLL", a1, a2, b1, b2); if (!m) return -1; if (PyList_Append(rl, m) != 0) {