Skip to content

Commit 24a1111

Browse files
rwgkcopybara-github
authored andcommitted
Systematically change _ to const_name in pybind11_abseil, pybind11_protobuf.
This is a functional no-op. Note that `_` was deprecated already in Dec 2021 (pybind/pybind11#3423). PiperOrigin-RevId: 575085924
1 parent 6c081a7 commit 24a1111

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

pybind11_protobuf/enum_type_caster.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct enum_type_caster {
4545
using base_caster = pybind11::detail::make_caster<T>;
4646

4747
public:
48-
static constexpr auto name = pybind11::detail::_<EnumType>();
48+
static constexpr auto name = pybind11::detail::const_name<EnumType>();
4949

5050
// cast converts from C++ -> Python
5151
static pybind11::handle cast(EnumType src,

pybind11_protobuf/proto_caster_impl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ struct proto_caster : public proto_caster_load_impl<ProtoType>,
190190
using Loader::value;
191191

192192
public:
193-
static constexpr auto name = pybind11::detail::_<ProtoType>();
193+
static constexpr auto name = pybind11::detail::const_name<ProtoType>();
194194

195195
// cast converts from C++ -> Python
196196
//

pybind11_protobuf/wrapped_proto_caster.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ struct wrapped_proto_caster : public pybind11_protobuf::proto_caster_load_impl<
138138
using pybind11_protobuf::native_cast_impl::cast_impl;
139139

140140
public:
141-
static constexpr auto name = pybind11::detail::_<WrappedProtoType>();
141+
static constexpr auto name = pybind11::detail::const_name<WrappedProtoType>();
142142

143143
// cast converts from C++ -> Python
144144
static pybind11::handle cast(WrappedProtoType src,
@@ -244,7 +244,8 @@ template <typename ProtoType>
244244
struct wrapped_proto_vector_caster {
245245
static constexpr auto name =
246246
(pybind11::detail::const_name("List[") +
247-
pybind11::detail::_<ProtoType>() + pybind11::detail::const_name("]"));
247+
pybind11::detail::const_name<ProtoType>() +
248+
pybind11::detail::const_name("]"));
248249

249250
// cast converts from Python -> C++
250251
bool load(pybind11::handle src, bool convert) {

0 commit comments

Comments
 (0)