changeset 46389:38b9a63d3a13

cext: restore the ability to build on Windows with py2 This broke in e92ca942ddca. Differential Revision: https://phab.mercurial-scm.org/D9867
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 25 Jan 2021 19:03:27 -0500
parents d8ad391e10f5
children 0800aa42bb4c
files contrib/python-zstandard/zstd/common/pythoncapi_compat.h mercurial/pythoncapi_compat.h
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/python-zstandard/zstd/common/pythoncapi_compat.h	Mon Jan 25 16:46:51 2021 +0100
+++ b/contrib/python-zstandard/zstd/common/pythoncapi_compat.h	Mon Jan 25 19:03:27 2021 -0500
@@ -20,6 +20,11 @@
 #include "frameobject.h"          // PyFrameObject, PyFrame_GetBack()
 
 
+/* VC 2008 doesn't know about the inline keyword. */
+#if defined(_MSC_VER) && _MSC_VER < 1900
+#define inline __forceinline
+#endif
+
 // Cast argument to PyObject* type.
 #ifndef _PyObject_CAST
 #  define _PyObject_CAST(op) ((PyObject*)(op))
--- a/mercurial/pythoncapi_compat.h	Mon Jan 25 16:46:51 2021 +0100
+++ b/mercurial/pythoncapi_compat.h	Mon Jan 25 19:03:27 2021 -0500
@@ -20,6 +20,11 @@
 #include "frameobject.h"          // PyFrameObject, PyFrame_GetBack()
 
 
+/* VC 2008 doesn't know about the inline keyword. */
+#if defined(_MSC_VER) && _MSC_VER < 1900
+#define inline __forceinline
+#endif
+
 // Cast argument to PyObject* type.
 #ifndef _PyObject_CAST
 #  define _PyObject_CAST(op) ((PyObject*)(op))