utility function to use to advance iterators using different functions
| 418 | |
| 419 | // utility function to use to advance iterators using different functions |
| 420 | HeaderFieldIteratorState * |
| 421 | advanceIterator(HeaderFieldIteratorState *state, TSMLoc (*getNextField)(TSMBuffer, TSMLoc, TSMLoc)) |
| 422 | { |
| 423 | if (state->mloc_container_->field_loc_ != TS_NULL_MLOC) { |
| 424 | TSMBuffer hdr_buf = state->mloc_container_->hdr_buf_; |
| 425 | TSMLoc hdr_loc = state->mloc_container_->hdr_loc_; |
| 426 | TSMLoc next_field_loc = getNextField(hdr_buf, hdr_loc, state->mloc_container_->field_loc_); |
| 427 | delete state; |
| 428 | state = new HeaderFieldIteratorState(hdr_buf, hdr_loc, next_field_loc); |
| 429 | } |
| 430 | return state; |
| 431 | } |
| 432 | |
| 433 | header_field_iterator & |
| 434 | header_field_iterator::operator++() |