[PATCH 2 of 4] cext: stop preprocessing a partial function call
Matt Harbison
mharbison72 at gmail.com
Thu Sep 13 17:44:14 EDT 2018
# HG changeset patch
# User Matt Harbison <matt_harbison at yahoo.com>
# Date 1536857030 14400
# Thu Sep 13 12:43:50 2018 -0400
# Node ID 058593637119420b3658ca40088de036450bd8aa
# Parent ecbaa8d6b0c2d20b99e80e1552f81520edac09bc
cext: stop preprocessing a partial function call
MSVC++ 14 yelled:
mercurial/cext/revlog.c(1913): fatal error C1057: unexpected end of file in
macro expansion
At this point, the C extensions build (with warnings), and it dies in win32.py
because the `_fields_` strings in the ctypes classes are being converted to
bytes by the source translator.
diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1911,10 +1911,11 @@ static int index_slice_del(indexObject *
/* Argument changed from PySliceObject* to PyObject* in Python 3. */
#ifdef IS_PY3K
if (PySlice_GetIndicesEx(item, length,
+ &start, &stop, &step, &slicelength) < 0)
#else
if (PySlice_GetIndicesEx((PySliceObject*)item, length,
+ &start, &stop, &step, &slicelength) < 0)
#endif
- &start, &stop, &step, &slicelength) < 0)
return -1;
if (slicelength <= 0)
More information about the Mercurial-devel
mailing list