From 5ccb893972b921605472dafeffcce6712e5aee94 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Thu, 27 Apr 2023 07:06:35 -0700 Subject: [PATCH] Change `type_caster::name` to `object`, as suggested by @Skylion007 --- include/pybind11/type_caster_pyobject_ptr.h | 2 +- tests/test_type_caster_pyobject_ptr.cpp | 2 ++ tests/test_type_caster_pyobject_ptr.py | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/pybind11/type_caster_pyobject_ptr.h b/include/pybind11/type_caster_pyobject_ptr.h index 3b6a7bed75..aa914f9e15 100644 --- a/include/pybind11/type_caster_pyobject_ptr.h +++ b/include/pybind11/type_caster_pyobject_ptr.h @@ -13,7 +13,7 @@ PYBIND11_NAMESPACE_BEGIN(detail) template <> class type_caster { public: - static constexpr auto name = const_name("PyObject *"); + static constexpr auto name = const_name("object"); // See discussion under PR #4601. // This overload is purely to guard against accidents. template None"): + m.pass_pyobject_ptr_and_int(ValueHolder(101), ValueHolder(202))