| 43 | } |
| 44 | |
| 45 | void* FunctionContext::GetFunctionState(FunctionStateScope scope) const { |
| 46 | assert(!impl_->closed_); |
| 47 | switch (scope) { |
| 48 | case THREAD_LOCAL: |
| 49 | return impl_->thread_local_fn_state_; |
| 50 | case FRAGMENT_LOCAL: |
| 51 | return impl_->fragment_local_fn_state_; |
| 52 | default: |
| 53 | // TODO: signal error somehow |
| 54 | return NULL; |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | uint8_t* FnCtxAllocateForResults(FunctionContext* ctx, int64_t byte_size) { |
| 59 | assert(ctx != nullptr); |
no outgoing calls