The state is a bool used to reduce excessive logs.
| 1936 | |
| 1937 | // The state is a bool used to reduce excessive logs. |
| 1938 | void StringFunctions::AesPrepare(FunctionContext* context, |
| 1939 | FunctionContext::FunctionStateScope scope) { |
| 1940 | if (scope != FunctionContext::THREAD_LOCAL) return; |
| 1941 | bool* state = reinterpret_cast<bool*>(context->Allocate(sizeof(bool))); |
| 1942 | if (state == nullptr) { |
| 1943 | context->AddWarning("Failed to allocate memory for function state."); |
| 1944 | return; |
| 1945 | } |
| 1946 | *state = false; |
| 1947 | context->SetFunctionState(scope, state); |
| 1948 | } |
| 1949 | |
| 1950 | void StringFunctions::AesClose(FunctionContext* context, |
| 1951 | FunctionContext::FunctionStateScope scope) { |
nothing calls this directly
no test coverage detected