Skip to content

Commit 302aca2

Browse files
committed
BUG: Import Python.h before stdlib headers
Python.h defines several visibility macros, which only work if defined before any stdlib header is included. This is needed for things like pybind11's strdup to get declared.
1 parent 6091437 commit 302aca2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mplutils.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#define MPLUTILS_H
77
#define PY_SSIZE_T_CLEAN
88

9+
#include <Python.h>
910
#include <stdint.h>
1011

1112
#ifdef _POSIX_C_SOURCE
@@ -27,7 +28,6 @@
2728
#endif
2829
#endif
2930

30-
#include <Python.h>
3131

3232
inline double mpl_round(double v)
3333
{

0 commit comments

Comments
 (0)