Skip to content

Commit 6ecec62

Browse files
Xiaofei Wangcopybara-github
Xiaofei Wang
authored andcommitted
Use handle::operator bool() instead of handle::check().
PiperOrigin-RevId: 521919036
1 parent ba9b679 commit 6ecec62

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pybind11_protobuf/proto_cast_util.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ py::object GlobalState::PyMessageInstance(const Descriptor* descriptor) {
305305
try {
306306
auto d = find_message_type_by_name_(descriptor->full_name());
307307
py::object p;
308-
if (get_message_class_.check()) {
308+
if (get_message_class_) {
309309
p = get_message_class_(d);
310310
} else {
311311
// TODO(pybind11-infra): Cleanup `MessageFactory.GetProtoType` after it

0 commit comments

Comments
 (0)