From 4bacd7dec1ea44497a77e94468a2e3f87cfba868 Mon Sep 17 00:00:00 2001 From: Dean Moldovan Date: Sun, 20 Aug 2017 17:23:12 +0200 Subject: [PATCH] Remove noinline from internal static locals --- include/pybind11/detail/internals.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/pybind11/detail/internals.h b/include/pybind11/detail/internals.h index 095c1888..213cbaeb 100644 --- a/include/pybind11/detail/internals.h +++ b/include/pybind11/detail/internals.h @@ -127,7 +127,7 @@ struct type_info { /// Each module locally stores a pointer to the `internals` data. The data /// itself is shared among modules with the same `PYBIND11_INTERNALS_ID`. -PYBIND11_NOINLINE inline internals *&get_internals_ptr() { +inline internals *&get_internals_ptr() { static internals *internals_ptr = nullptr; return internals_ptr; } @@ -196,7 +196,7 @@ PYBIND11_NOINLINE inline internals &get_internals() { } /// Works like `internals.registered_types_cpp`, but for module-local registered types: -PYBIND11_NOINLINE inline type_map ®istered_local_types_cpp() { +inline type_map ®istered_local_types_cpp() { static type_map locals{}; return locals; }