From 78e074b8bbda1073e60273620e084aac28b0740c Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 2 Nov 2022 23:17:46 +0100 Subject: [PATCH] clang-tidy fix --- include/pybind11/detail/internals.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/pybind11/detail/internals.h b/include/pybind11/detail/internals.h index 8abecb8c5..03c105063 100644 --- a/include/pybind11/detail/internals.h +++ b/include/pybind11/detail/internals.h @@ -411,8 +411,9 @@ inline object get_internals_state_dict() { # else PyInterpreterState *istate = PyInterpreterState_Get(); # endif - if (istate) + if (istate) { state_dict = reinterpret_borrow(PyInterpreterState_GetDict(istate)); + } #endif if (!state_dict) { raise_from(PyExc_SystemError, "get_internals(): could not acquire state dictionary!");