Skip to content

Commit 5d29e4f

Browse files
committed
fix: drop redundant redeclarations in pybind11.h
These functions are already declared in function_record_pyobject.h, attr.h, and type_caster_base.h; GCC 13 -Wredundant-decls rejects the repeats. Assisted-by: ClaudeCode:claude-fable-5
1 parent 012821a commit 5d29e4f

1 file changed

Lines changed: 0 additions & 14 deletions

File tree

‎include/pybind11/pybind11.h‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -569,13 +569,6 @@ class cpp_function : public function {
569569

570570
PYBIND11_NAMESPACE_BEGIN(detail)
571571

572-
PYBIND11_NAMESPACE_BEGIN(function_record_PyTypeObject_methods)
573-
574-
// This implementation needs the definition of `class cpp_function`.
575-
void tp_dealloc_impl(PyObject *self);
576-
577-
PYBIND11_NAMESPACE_END(function_record_PyTypeObject_methods)
578-
579572
template <>
580573
struct handle_type_name<cpp_function> {
581574
static constexpr auto name = const_name("collections.abc.Callable");
@@ -2148,13 +2141,6 @@ class enum_ : public class_<Type> {
21482141

21492142
PYBIND11_NAMESPACE_BEGIN(detail)
21502143

2151-
void keep_alive_impl(handle nurse, handle patient);
2152-
2153-
void keep_alive_impl(size_t Nurse, size_t Patient, function_call &call, handle ret);
2154-
2155-
std::pair<decltype(internals::registered_types_py)::iterator, bool>
2156-
all_type_info_get_cache(PyTypeObject *type);
2157-
21582144
/* There are a large number of apparently unused template arguments because
21592145
* each combination requires a separate py::class_ registration.
21602146
*/

0 commit comments

Comments
 (0)