| 182 | } |
| 183 | |
| 184 | Edge *Record_GetEdge |
| 185 | ( |
| 186 | const Record r, |
| 187 | uint idx |
| 188 | ) { |
| 189 | switch(r->entries[idx].type) { |
| 190 | case REC_TYPE_EDGE: |
| 191 | return &(r->entries[idx].value.e); |
| 192 | case REC_TYPE_UNKNOWN: |
| 193 | return NULL; |
| 194 | case REC_TYPE_SCALAR: |
| 195 | // Null scalar values are expected here; otherwise fall through. |
| 196 | if(SIValue_IsNull(r->entries[idx].value.s)) return NULL; |
| 197 | default: |
| 198 | ErrorCtx_RaiseRuntimeException("encountered unexpected type in Record; expected Edge"); |
| 199 | return NULL; |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | SIValue Record_Get |
| 204 | ( |
no test coverage detected