| 35 | using ::google::api::expr::runtime::CreateRegexPrecompilationExtension; |
| 36 | |
| 37 | absl::StatusOr<RuntimeImpl*> RuntimeImplFromBuilder(RuntimeBuilder& builder) { |
| 38 | Runtime& runtime = RuntimeFriendAccess::GetMutableRuntime(builder); |
| 39 | |
| 40 | if (RuntimeFriendAccess::RuntimeTypeId(runtime) != |
| 41 | NativeTypeId::For<RuntimeImpl>()) { |
| 42 | return absl::UnimplementedError( |
| 43 | "regex precompilation only supported on the default cel::Runtime " |
| 44 | "implementation."); |
| 45 | } |
| 46 | |
| 47 | RuntimeImpl& runtime_impl = down_cast<RuntimeImpl&>(runtime); |
| 48 | |
| 49 | return &runtime_impl; |
| 50 | } |
| 51 | |
| 52 | } // namespace |
| 53 |
no outgoing calls
no test coverage detected