From daae3011b722202a8b5fbe5d39cff3add39bab3c Mon Sep 17 00:00:00 2001 From: pybind11_protobuf authors Date: Sat, 4 Jul 2026 00:16:25 -0700 Subject: [PATCH] Automated Code Change PiperOrigin-RevId: 942391721 --- pybind11_protobuf/proto_cast_util.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pybind11_protobuf/proto_cast_util.cc b/pybind11_protobuf/proto_cast_util.cc index ddd81d6..666fec8 100644 --- a/pybind11_protobuf/proto_cast_util.cc +++ b/pybind11_protobuf/proto_cast_util.cc @@ -87,7 +87,7 @@ absl::optional ResolveAttrs( PyObject* attr = PyObject_GetAttrString(obj.ptr(), name); if (attr == nullptr) { PyErr_Clear(); - return absl::nullopt; + return std::nullopt; } tmp = py::reinterpret_steal(attr); obj = py::handle(attr); @@ -110,7 +110,7 @@ absl::optional ResolveAttrMRO(py::handle obj, const char* name) { return py::reinterpret_steal(attr); } PyErr_Clear(); - return absl::nullopt; + return std::nullopt; } auto unicode = py::reinterpret_steal(PyUnicode_FromString(name)); @@ -132,7 +132,7 @@ absl::optional ResolveAttrMRO(py::handle obj, const char* name) { PyErr_Clear(); } } - return absl::nullopt; + return std::nullopt; } absl::optional CastToOptionalString(py::handle src) { @@ -141,7 +141,7 @@ absl::optional CastToOptionalString(py::handle src) { if (c.load(src, false)) { return pybind11::detail::cast_op(std::move(c)); } - return absl::nullopt; + return std::nullopt; } class GlobalState { @@ -498,7 +498,7 @@ absl::optional PyProtoDescriptorFullName(py::handle py_proto) { if (py_full_name) { return CastToOptionalString(*py_full_name); } - return absl::nullopt; + return std::nullopt; } bool PyProtoHasMatchingFullName(py::handle py_proto,