4242#include " runtime/runtime.h"
4343#include " py_cel_activation.h"
4444#include " py_cel_arena.h"
45- #include " py_cel_env .h"
45+ #include " py_cel_env_internal .h"
4646#include " py_cel_type.h"
4747#include " py_cel_value.h"
4848#include " py_error_status.h"
@@ -71,12 +71,12 @@ void PyCelExpression::DefinePythonBindings(py::module& m) {
7171}
7272
7373absl::StatusOr<PyCelExpression> PyCelExpression::Compile (
74- const std::shared_ptr<PyCelEnv >& env, const std::string& cel_expr,
74+ const std::shared_ptr<PyCelEnvInternal >& env, const std::string& cel_expr,
7575 bool disable_check) {
7676 ABSL_CHECK (PyGILState_Check ());
7777
7878 PY_CEL_ASSIGN_OR_RETURN (const cel::Compiler* compiler,
79- PyCelEnv ::GetCompiler (env));
79+ PyCelEnvInternal ::GetCompiler (env));
8080
8181 if (disable_check) {
8282 PY_CEL_ASSIGN_OR_RETURN (auto s, cel::NewSource (cel_expr, " <input>" ));
@@ -121,21 +121,22 @@ absl::StatusOr<PyCelValue> PyCelExpression::Eval(
121121 if (std::holds_alternative<ParsedExpr>(expr_)) {
122122 CEL_PYTHON_ASSIGN_OR_RETURN (
123123 const cel::Runtime* runtime,
124- PyCelEnv::GetRuntime (env_, PyCelEnv::kStandardIgnoreWarnings ));
124+ PyCelEnvInternal::GetRuntime (
125+ env_, PyCelEnvInternal::kStandardIgnoreWarnings ));
125126 CEL_PYTHON_ASSIGN_OR_RETURN (
126127 cel_program_, cel::extensions::ProtobufRuntimeAdapter::CreateProgram (
127128 *runtime, std::get<ParsedExpr>(expr_)));
128129 } else {
129130 CEL_PYTHON_ASSIGN_OR_RETURN (
130131 const cel::Runtime* runtime,
131- PyCelEnv ::GetRuntime (env_, PyCelEnv ::kStandard ));
132+ PyCelEnvInternal ::GetRuntime (env_, PyCelEnvInternal ::kStandard ));
132133 CEL_PYTHON_ASSIGN_OR_RETURN (
133134 cel_program_, cel::extensions::ProtobufRuntimeAdapter::CreateProgram (
134135 *runtime, std::get<CheckedExpr>(expr_)));
135136 }
136137 }
137138 std::shared_ptr<PyCelArena> arena = activation.GetArena ();
138- std::shared_ptr<PyCelEnv > env = activation.GetEnv ();
139+ std::shared_ptr<PyCelEnvInternal > env = activation.GetEnv ();
139140 cel::EmbedderContext embedder_context = cel::EmbedderContext::From (&env);
140141 cel::EvaluateOptions options;
141142 options.message_factory = env->GetMessageFactory ();
@@ -158,7 +159,8 @@ std::string PyCelExpression::Serialize() const {
158159}
159160
160161absl::StatusOr<PyCelExpression> PyCelExpression::Deserialize (
161- const std::shared_ptr<PyCelEnv>& env, const std::string& serialized_expr) {
162+ const std::shared_ptr<PyCelEnvInternal>& env,
163+ const std::string& serialized_expr) {
162164 ABSL_CHECK (PyGILState_Check ());
163165 google::protobuf::Any any;
164166 if (!any.ParseFromString (serialized_expr)) {
0 commit comments