Skip to content

Commit 33660fd

Browse files
pybind11_protobuf authorscopybara-github
pybind11_protobuf authors
authored andcommitted
Use DescriptorDatabase overridden virtual methods to use StringViewArg alias.
PiperOrigin-RevId: 754926003
1 parent f02a2b7 commit 33660fd

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

pybind11_protobuf/proto_cast_util.cc

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,9 +354,14 @@ class PythonDescriptorPoolWrapper {
354354
// These 3 methods implement DescriptorDatabase and delegate to
355355
// the Python DescriptorPool.
356356

357+
// Use copybara strip tag to desync Google3 from OSS
358+
// until dependencies are updated.
359+
357360
// Find a file by file name.
358-
bool FindFileByName(const std::string& filename,
359-
FileDescriptorProto* output) override {
361+
bool FindFileByName(
362+
const std::string& filename
363+
,
364+
FileDescriptorProto* output) override {
360365
try {
361366
auto file = pool_.attr("FindFileByName")(filename);
362367
return CopyToFileDescriptorProto(file, output);
@@ -371,8 +376,10 @@ class PythonDescriptorPoolWrapper {
371376
}
372377

373378
// Find the file that declares the given fully-qualified symbol name.
374-
bool FindFileContainingSymbol(const std::string& symbol_name,
375-
FileDescriptorProto* output) override {
379+
bool FindFileContainingSymbol(
380+
const std::string& symbol_name
381+
,
382+
FileDescriptorProto* output) override {
376383
try {
377384
auto file = pool_.attr("FindFileContainingSymbol")(symbol_name);
378385
return CopyToFileDescriptorProto(file, output);
@@ -389,9 +396,10 @@ class PythonDescriptorPoolWrapper {
389396

390397
// Find the file which defines an extension extending the given message type
391398
// with the given field number.
392-
bool FindFileContainingExtension(const std::string& containing_type,
393-
int field_number,
394-
FileDescriptorProto* output) override {
399+
bool FindFileContainingExtension(
400+
const std::string& containing_type
401+
,
402+
int field_number, FileDescriptorProto* output) override {
395403
try {
396404
auto descriptor = pool_.attr("FindMessageTypeByName")(containing_type);
397405
auto file =

0 commit comments

Comments
 (0)