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,8 @@ void *priv) { PyObject *rl = (PyObject *)priv; - PyObject *m = Py_BuildValue("llll", a1, a2, b1, b2); + Py_BUILD_ASSERT(sizeof(a1) == sizeof(PY_LONG_LONG)); + PyObject *m = Py_BuildValue("LLLL", a1, a2, b1, b2); if (!m) return -1; if (PyList_Append(rl, m) != 0) {