Skip to content

Use DescriptorDatabase overridden virtual methods to use StringViewArg alias. #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged
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
19 changes: 12 additions & 7 deletions pybind11_protobuf/proto_cast_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,10 @@ class PythonDescriptorPoolWrapper {
// the Python DescriptorPool.

// Find a file by file name.
bool FindFileByName(const std::string& filename,
FileDescriptorProto* output) override {
bool FindFileByName(
const std::string& filename
,
FileDescriptorProto* output) override {
try {
auto file = pool_.attr("FindFileByName")(filename);
return CopyToFileDescriptorProto(file, output);
Expand All @@ -371,8 +373,10 @@ class PythonDescriptorPoolWrapper {
}

// Find the file that declares the given fully-qualified symbol name.
bool FindFileContainingSymbol(const std::string& symbol_name,
FileDescriptorProto* output) override {
bool FindFileContainingSymbol(
const std::string& symbol_name
,
FileDescriptorProto* output) override {
try {
auto file = pool_.attr("FindFileContainingSymbol")(symbol_name);
return CopyToFileDescriptorProto(file, output);
Expand All @@ -389,9 +393,10 @@ class PythonDescriptorPoolWrapper {

// Find the file which defines an extension extending the given message type
// with the given field number.
bool FindFileContainingExtension(const std::string& containing_type,
int field_number,
FileDescriptorProto* output) override {
bool FindFileContainingExtension(
const std::string& containing_type
,
int field_number, FileDescriptorProto* output) override {
try {
auto descriptor = pool_.attr("FindMessageTypeByName")(containing_type);
auto file =
Expand Down
Loading