Skip to content

Commit bc5a580

Browse files
Merge pull request #374 from Infinoid/python-warnings
Fix warnings in python bindings
2 parents fda53cd + 6936727 commit bc5a580

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

python_bindings/pybind11/include/pybind11/detail/common.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ inline void ignore_unused(const int *) { }
648648
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) (((PATTERN), void()), ...)
649649
#else
650650
using expand_side_effects = bool[];
651-
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
651+
#define PYBIND11_EXPAND_SIDE_EFFECTS(PATTERN) (void)pybind11::detail::expand_side_effects{ ((PATTERN), void(), false)..., false }
652652
#endif
653653

654654
NAMESPACE_END(detail)

python_bindings/pybind11/include/pybind11/detail/internals.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ PYBIND11_NOINLINE inline internals &get_internals() {
197197
auto *&internals_ptr = *internals_pp;
198198
internals_ptr = new internals();
199199
#if defined(WITH_THREAD)
200-
PyEval_InitThreads();
200+
201+
# if PY_VERSION_HEX < 0x03090000
202+
PyEval_InitThreads();
203+
# endif
201204
PyThreadState *tstate = PyThreadState_Get();
202205
#if PY_VERSION_HEX >= 0x03070000
203206
internals_ptr->tstate = PyThread_tss_alloc();

0 commit comments

Comments
 (0)