From ca58fec59d6c165657df765d98dc58600fa66f10 Mon Sep 17 00:00:00 2001 From: Jie Luo Date: Mon, 10 Apr 2023 11:01:19 -0700 Subject: [PATCH] internal change PiperOrigin-RevId: 523159480 --- pybind11_protobuf/proto_cast_util.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pybind11_protobuf/proto_cast_util.cc b/pybind11_protobuf/proto_cast_util.cc index 1c8727f..cddc4e8 100644 --- a/pybind11_protobuf/proto_cast_util.cc +++ b/pybind11_protobuf/proto_cast_util.cc @@ -230,7 +230,7 @@ GlobalState::GlobalState() { auto type = ImportCached("google.protobuf.internal.api_implementation") .attr("Type")(); - using_fast_cpp_ = (CastToOptionalString(type).value_or("") == "cpp"); + using_fast_cpp_ = (CastToOptionalString(type).value_or("") != "python"); #if defined(PYBIND11_PROTOBUF_ENABLE_PYPROTO_API) // DANGER: The only way to guarantee that the PyProto_API doesn't have