Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pybind11_protobuf/check_unknown_fields.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool MessageMayContainExtensionsRecursive(const ::google::protobuf::Descriptor*
bool MessageMayContainExtensionsMemoized(const ::google::protobuf::Descriptor* descriptor) {
static auto* memoized = new MayContainExtensionsMap();
static absl::Mutex lock;
absl::MutexLock l(&lock);
absl::MutexLock l(lock);
return MessageMayContainExtensionsRecursive(descriptor, memoized);
}

Expand Down Expand Up @@ -187,11 +187,11 @@ absl::optional<std::string> CheckRecursively(
const auto* root_descriptor = message->GetDescriptor();
HasUnknownFields search{py_proto_api, root_descriptor};
if (!search.FindUnknownFieldsRecursive(message, 0u)) {
return absl::nullopt;
return std::nullopt;
}
if (GetAllowList()->count(MakeAllowListKey(root_descriptor->full_name(),
search.FieldFQN())) != 0) {
return absl::nullopt;
return std::nullopt;
}
return search.BuildErrorMessage();
}
Expand Down
Loading