mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-13 17:56:02 +00:00
fix: add missing PYBIND11_ALWAYS_INLINE macro for v3.0.3 backports
Cherry-picking #5992 without #5887 left this macro undefined and broke builds, so this restores the expected inline helper definition with the smallest possible change. Made-with: Cursor
This commit is contained in:
@@ -167,6 +167,14 @@
|
||||
# define PYBIND11_NOINLINE __attribute__((noinline)) inline
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# define PYBIND11_ALWAYS_INLINE __forceinline
|
||||
#elif defined(__GNUC__)
|
||||
# define PYBIND11_ALWAYS_INLINE __attribute__((__always_inline__)) inline
|
||||
#else
|
||||
# define PYBIND11_ALWAYS_INLINE inline
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
// For unknown reasons all PYBIND11_DEPRECATED member trigger a warning when declared
|
||||
// whether it is used or not
|
||||
|
||||
Reference in New Issue
Block a user