Skip to content

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

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
8 changes: 4 additions & 4 deletions python/google/protobuf/pyext/descriptor_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@ class PyDescriptorDatabase : public DescriptorDatabase {
// with a copy of FileDescriptorProto.

// Find a file by file name.
bool FindFileByName(const std::string& filename,
bool FindFileByName(StringViewArg filename,
FileDescriptorProto* output) override;

// Find the file that declares the given fully-qualified symbol name.
bool FindFileContainingSymbol(const std::string& symbol_name,
bool FindFileContainingSymbol(StringViewArg symbol_name,
FileDescriptorProto* output) override;

// Find the file which defines an extension extending the given message type
// with the given field number.
// Containing_type must be a fully-qualified type name.
// Python objects are not required to implement this method.
bool FindFileContainingExtension(const std::string& containing_type,
bool FindFileContainingExtension(StringViewArg containing_type,
int field_number,
FileDescriptorProto* output) override;

// Finds the tag numbers used by all known extensions of
// containing_type, and appends them to output in an undefined
// order.
// Python objects are not required to implement this method.
bool FindAllExtensionNumbers(const std::string& containing_type,
bool FindAllExtensionNumbers(StringViewArg containing_type,
std::vector<int>* output) override;

private:
Expand Down
Loading