From 6e83ecd4979c52c8a89e0f9e18726613dd5e7f48 Mon Sep 17 00:00:00 2001 From: shrita2000 Date: Thu, 6 Apr 2023 14:23:52 +0900 Subject: [PATCH] solved PyType_Slot *slots; bug in Python.h include command --- matplotlibcpp.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/matplotlibcpp.h b/matplotlibcpp.h index d95d46a..c49110b 100644 --- a/matplotlibcpp.h +++ b/matplotlibcpp.h @@ -2,7 +2,10 @@ // Python headers must be included before any system headers, since // they define _POSIX_C_SOURCE -#include +#pragma push_macro("slots") +#undef slots +#include "Python.h" +#pragma pop_macro("slots") #include #include