@@ -1220,14 +1220,14 @@ void trailer_iterator_init(struct trailer_iterator *iter, const char *msg)
strbuf_init(&iter->key, 0);
strbuf_init(&iter->val, 0);
opts.no_divider = 1;
- trailer_info_get(&iter->info, msg, &opts);
- iter->cur = 0;
+ trailer_info_get(&iter->internal.info, msg, &opts);
+ iter->internal.cur = 0;
}
int trailer_iterator_advance(struct trailer_iterator *iter)
{
- while (iter->cur < iter->info.trailer_nr) {
- char *trailer = iter->info.trailers[iter->cur++];
+ while (iter->internal.cur < iter->internal.info.trailer_nr) {
+ char *trailer = iter->internal.info.trailers[iter->internal.cur++];
int separator_pos = find_separator(trailer, separators);
if (separator_pos < 1)
@@ -1245,7 +1245,7 @@ int trailer_iterator_advance(struct trailer_iterator *iter)
void trailer_iterator_release(struct trailer_iterator *iter)
{
- trailer_info_release(&iter->info);
+ trailer_info_release(&iter->internal.info);
strbuf_release(&iter->val);
strbuf_release(&iter->key);
}
@@ -119,8 +119,10 @@ struct trailer_iterator {
struct strbuf val;
/* private */
- struct trailer_info info;
- size_t cur;
+ struct {
+ struct trailer_info info;
+ size_t cur;
+ } internal;
};
/*