Skip to content

Commit e43db08

Browse files
committed
Fix more redundant declarations
... introduced with merge of smart_holder branch
1 parent 23f3ef0 commit e43db08

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

include/pybind11/detail/function_record_pyobject.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,6 @@ inline int tp_init_impl(PyObject *, PyObject *, PyObject *) {
173173
// return -1; // Unreachable.
174174
}
175175

176-
// The implementation needs the definition of `class cpp_function`.
177-
void tp_dealloc_impl(PyObject *self);
178-
179176
inline void tp_free_impl(void *) {
180177
pybind11_fail("UNEXPECTED CALL OF function_record_PyTypeObject_methods::tp_free_impl");
181178
}

include/pybind11/detail/type_caster_base.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,9 +511,14 @@ inline PyThreadState *get_thread_state_unchecked() {
511511
void keep_alive_impl(handle nurse, handle patient);
512512
inline PyObject *make_new_instance(PyTypeObject *type);
513513

514+
PYBIND11_WARNING_PUSH
515+
PYBIND11_WARNING_DISABLE_GCC("-Wredundant-decls")
516+
514517
// PYBIND11:REMINDER: Needs refactoring of existing pybind11 code.
515518
inline bool deregister_instance(instance *self, void *valptr, const type_info *tinfo);
516519

520+
PYBIND11_WARNING_POP
521+
517522
PYBIND11_NAMESPACE_BEGIN(smart_holder_type_caster_support)
518523

519524
struct value_and_holder_helper {

0 commit comments

Comments
 (0)