Skip to content

Commit 1d8f214

Browse files
pybind11_protobuf authorscopybara-github
authored andcommitted
Automated Code Change
PiperOrigin-RevId: 932830744
1 parent 8c2fe74 commit 1d8f214

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

pybind11_protobuf/proto_cast_util.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ absl::optional<py::object> ResolveAttrs(
8787
PyObject* attr = PyObject_GetAttrString(obj.ptr(), name);
8888
if (attr == nullptr) {
8989
PyErr_Clear();
90-
return absl::nullopt;
90+
return std::nullopt;
9191
}
9292
tmp = py::reinterpret_steal<py::object>(attr);
9393
obj = py::handle(attr);
@@ -110,7 +110,7 @@ absl::optional<py::object> ResolveAttrMRO(py::handle obj, const char* name) {
110110
return py::reinterpret_steal<py::object>(attr);
111111
}
112112
PyErr_Clear();
113-
return absl::nullopt;
113+
return std::nullopt;
114114
}
115115

116116
auto unicode = py::reinterpret_steal<py::object>(PyUnicode_FromString(name));
@@ -132,7 +132,7 @@ absl::optional<py::object> ResolveAttrMRO(py::handle obj, const char* name) {
132132
PyErr_Clear();
133133
}
134134
}
135-
return absl::nullopt;
135+
return std::nullopt;
136136
}
137137

138138
absl::optional<std::string> CastToOptionalString(py::handle src) {
@@ -141,7 +141,7 @@ absl::optional<std::string> CastToOptionalString(py::handle src) {
141141
if (c.load(src, false)) {
142142
return pybind11::detail::cast_op<std::string>(std::move(c));
143143
}
144-
return absl::nullopt;
144+
return std::nullopt;
145145
}
146146

147147
class GlobalState {
@@ -498,7 +498,7 @@ absl::optional<std::string> PyProtoDescriptorFullName(py::handle py_proto) {
498498
if (py_full_name) {
499499
return CastToOptionalString(*py_full_name);
500500
}
501-
return absl::nullopt;
501+
return std::nullopt;
502502
}
503503

504504
bool PyProtoHasMatchingFullName(py::handle py_proto,

0 commit comments

Comments
 (0)