* Evaluate SubscriptingRef fetch for an array element. * * Source container is in step's result variable (it's known not NULL, since * we set fetch_strict to true), and indexes have already been evaluated into * workspace array. */
| 233 | * workspace array. |
| 234 | */ |
| 235 | static void |
| 236 | array_subscript_fetch(ExprState *state, |
| 237 | ExprEvalStep *op, |
| 238 | ExprContext *econtext) |
| 239 | { |
| 240 | SubscriptingRefState *sbsrefstate = op->d.sbsref.state; |
| 241 | ArraySubWorkspace *workspace = (ArraySubWorkspace *) sbsrefstate->workspace; |
| 242 | |
| 243 | /* Should not get here if source array (or any subscript) is null */ |
| 244 | Assert(!(*op->resnull)); |
| 245 | |
| 246 | *op->resvalue = array_get_element(*op->resvalue, |
| 247 | sbsrefstate->numupper, |
| 248 | workspace->upperindex, |
| 249 | workspace->refattrlength, |
| 250 | workspace->refelemlength, |
| 251 | workspace->refelembyval, |
| 252 | workspace->refelemalign, |
| 253 | op->resnull); |
| 254 | } |
| 255 | |
| 256 | /* |
| 257 | * Evaluate SubscriptingRef fetch for an array slice. |
nothing calls this directly
no test coverage detected