Skip to content

Commit

Permalink
internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 618978761
  • Loading branch information
anandolee authored and copybara-github committed Mar 26, 2024
1 parent 0f2ad6d commit 5573504
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
7 changes: 4 additions & 3 deletions python/google/protobuf/link_error_fast_cpp.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ namespace google {
namespace protobuf {
namespace python {

// This exists solely to cause a build/link time error when both
// :use_fast_cpp_protos and :use_pure_python are specified in a build.;
// This exists solely to cause a build/link time error when more than one of
// :use_upb_protos, :use_fast_cpp_protos and :use_pure_python are specified
// in a build.;

extern "C" {

// MUST match link_error_pure_python.cc's function signature.

__attribute__((noinline)) __attribute__((optnone)) int
go_SLASH_build_deps_on_BOTH_use_fast_cpp_protos_AND_use_pure_python() {
go_SLASH_build_deps_on_multiple_python_proto_backends() {
return 1;
}

Expand Down
7 changes: 4 additions & 3 deletions python/google/protobuf/link_error_pure_python.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ namespace google {
namespace protobuf {
namespace python {

// This exists solely to cause a build/link time error when both
// :use_fast_cpp_protos and :use_pure_python are specified in a build.;
// This exists solely to cause a build/link time error when more than one of
// :use_upb_protos, :use_fast_cpp_protos and :use_pure_python are specified
// in a build.;

extern "C" {

// MUST match link_error_pure_python.cc's function signature.

__attribute__((noinline)) __attribute__((optnone)) int
go_SLASH_build_deps_on_BOTH_use_fast_cpp_protos_AND_use_pure_python() {
go_SLASH_build_deps_on_multiple_python_proto_backends() {
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion python/google/protobuf/link_error_upb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ extern "C" {
// MUST match link_error_pure_python.cc's function signature.

__attribute__((noinline)) __attribute__((optnone)) int
go_SLASH_build_deps_on_BOTH_use_fast_cpp_protos_AND_use_pure_python() {
go_SLASH_build_deps_on_multiple_python_proto_backends() {
return 2;
}

Expand Down

0 comments on commit 5573504

Please sign in to comment.