Get the field and value of the current item we are iterating. This should * be called immediately after streamIteratorGetID(), and for each field * according to the number of fields returned by streamIteratorGetID(). * The function populates the field and value pointers and the corresponding * lengths by reference, that are valid until the next iterator call, assuming * no one touches the str
| 1234 | * lengths by reference, that are valid until the next iterator call, assuming |
| 1235 | * no one touches the stream meanwhile. */ |
| 1236 | void streamIteratorGetField(streamIterator *si, unsigned char **fieldptr, unsigned char **valueptr, int64_t *fieldlen, int64_t *valuelen) { |
| 1237 | if (si->entry_flags & STREAM_ITEM_FLAG_SAMEFIELDS) { |
| 1238 | *fieldptr = lpGet(si->master_fields_ptr,fieldlen,si->field_buf); |
| 1239 | si->master_fields_ptr = lpNext(si->lp,si->master_fields_ptr); |
| 1240 | } else { |
| 1241 | *fieldptr = lpGet(si->lp_ele,fieldlen,si->field_buf); |
| 1242 | si->lp_ele = lpNext(si->lp,si->lp_ele); |
| 1243 | } |
| 1244 | *valueptr = lpGet(si->lp_ele,valuelen,si->value_buf); |
| 1245 | si->lp_ele = lpNext(si->lp,si->lp_ele); |
| 1246 | } |
| 1247 | |
| 1248 | /* Remove the current entry from the stream: can be called after the |
| 1249 | * GetID() API or after any GetField() call, however we need to iterate |
no test coverage detected