cext: stop preprocessing a partial function call
authorMatt Harbison <matt_harbison@yahoo.com>
Thu, 13 Sep 2018 12:43:50 -0400
changeset 39609 c06c585f166b
parent 39608 ec68135a8935
child 39610 11ed2eadf937
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.
mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c	Thu Sep 13 12:37:32 2018 -0400
+++ b/mercurial/cext/revlog.c	Thu Sep 13 12:43:50 2018 -0400
@@ -1911,10 +1911,11 @@
 /* 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)