8000 BLD,Cygwin: Included Python.h first in src/_c_internal_utils.cpp · matplotlib/matplotlib@052e4e7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 052e4e7

Browse files
authored
BLD,Cygwin: Included Python.h first in src/_c_internal_utils.cpp
Python.h needs to be included before any system includes. This is easiest if it is the first include. Interestingly, pybind11/pybind11.h does not include Python, possibly depending on downstream projects including Python.h beforehand.
1 parent 5e34777 commit 052e4e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/_c_internal_utils.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
#include <Python.h>
2+
/* Python.h must be included before any system headers,
3+
to ensure visibility macros are properly set. */
14
#include <stdexcept>
25

36
#ifdef _WIN32

0 commit comments

Comments
 (0)
0