From c8e506961ca205bdacf748a9be853300ef90af4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20M=C3=B6ller?= Date: Sat, 18 Feb 2017 14:29:54 +0100 Subject: [PATCH] fix msvc warning when Python.h was included before pybind11.h (#683) * fix warning when Python.h was included before pybind11.h * remove trailing whitespace --- include/pybind11/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/pybind11/common.h b/include/pybind11/common.h index a1ee28ca5..c3f1e3048 100644 --- a/include/pybind11/common.h +++ b/include/pybind11/common.h @@ -58,7 +58,9 @@ /// Include Python header, disable linking to pythonX_d.lib on Windows in debug mode #if defined(_MSC_VER) -# define HAVE_ROUND +# if (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION < 4) +# define HAVE_ROUND 1 +# endif # pragma warning(push) # pragma warning(disable: 4510 4610 4512 4005) # if defined(_DEBUG)