diff --git a/include/pybind11/subinterpreter.h b/include/pybind11/subinterpreter.h index 45396fac3..1bdcc26a3 100644 --- a/include/pybind11/subinterpreter.h +++ b/include/pybind11/subinterpreter.h @@ -21,7 +21,7 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) PYBIND11_NAMESPACE_BEGIN(detail) -PyInterpreterState *get_interpreter_state_unchecked() { +inline PyInterpreterState *get_interpreter_state_unchecked() { auto cur_tstate = get_thread_state_unchecked(); if (cur_tstate) return cur_tstate->interp;