From 1272d653b0069cc35f0d0caa84d48f8e83d2b726 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Wed, 14 May 2025 16:24:24 +0200 Subject: [PATCH 1/4] Remove `inline` from declaration --- include/pybind11/detail/cpp_conduit.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/cpp_conduit.h b/include/pybind11/detail/cpp_conduit.h index a06b9b21a0..aaa38e2779 100644 --- a/include/pybind11/detail/cpp_conduit.h +++ b/include/pybind11/detail/cpp_conduit.h @@ -13,7 +13,7 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) PYBIND11_NAMESPACE_BEGIN(detail) // Forward declaration needed here: Refactoring opportunity. -extern "C" inline PyObject *pybind11_object_new(PyTypeObject *type, PyObject *, PyObject *); +extern "C" PyObject *pybind11_object_new(PyTypeObject *type, PyObject *, PyObject *); inline bool type_is_managed_by_our_internals(PyTypeObject *type_obj) { #if defined(PYPY_VERSION) From 44f4a9791e945f5575286a1e56e8df13ea367151 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Wed, 14 May 2025 16:25:28 +0200 Subject: [PATCH 2/4] Remove `inline` from declaration --- include/pybind11/detail/internals.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/pybind11/detail/internals.h b/include/pybind11/detail/internals.h index 395ffbcb51..9f599ce335 100644 --- a/include/pybind11/detail/internals.h +++ b/include/pybind11/detail/internals.h @@ -51,10 +51,10 @@ PYBIND11_NAMESPACE_BEGIN(detail) constexpr const char *internals_function_record_capsule_name = "pybind11_function_record_capsule"; // Forward declarations -inline PyTypeObject *make_static_property_type(); -inline PyTypeObject *make_default_metaclass(); -inline PyObject *make_object_base_type(PyTypeObject *metaclass); -inline void translate_exception(std::exception_ptr p); +PyTypeObject *make_static_property_type(); +PyTypeObject *make_default_metaclass(); +PyObject *make_object_base_type(PyTypeObject *metaclass); +void translate_exception(std::exception_ptr p); // The old Python Thread Local Storage (TLS) API is deprecated in Python 3.7 in favor of the new // Thread Specific Storage (TSS) API. From fa35cc6b4f1578582a3579f76f17688d3a40cfc9 Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Wed, 14 May 2025 16:26:09 +0200 Subject: [PATCH 3/4] Remove `inline` from declaration --- include/pybind11/detail/type_caster_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/type_caster_base.h b/include/pybind11/detail/type_caster_base.h index 9734d92181..8598291db9 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -94,7 +94,7 @@ class loader_life_support { // Gets the cache entry for the given type, creating it if necessary. The return value is the pair // returned by emplace, i.e. an iterator for the entry and a bool set to `true` if the entry was // just created. -inline std::pair +std::pair all_type_info_get_cache(PyTypeObject *type); // Band-aid workaround to fix a subtle but serious bug in a minimalistic fashion. See PR #4762. From efd784ac70f2470cd1114613886270147335409e Mon Sep 17 00:00:00 2001 From: Boaz Brickner Date: Wed, 14 May 2025 16:26:29 +0200 Subject: [PATCH 4/4] Remove `inline` from declaration --- include/pybind11/detail/type_caster_base.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/type_caster_base.h b/include/pybind11/detail/type_caster_base.h index 8598291db9..00478fcf8b 100644 --- a/include/pybind11/detail/type_caster_base.h +++ b/include/pybind11/detail/type_caster_base.h @@ -499,7 +499,7 @@ PYBIND11_NOINLINE handle get_object_handle(const void *ptr, const detail::type_i // Forward declarations void keep_alive_impl(handle nurse, handle patient); -inline PyObject *make_new_instance(PyTypeObject *type); +PyObject *make_new_instance(PyTypeObject *type); PYBIND11_WARNING_PUSH PYBIND11_WARNING_DISABLE_GCC("-Wredundant-decls")