message_parser_init(pool_t part_pool, struct istream *input,
		    const struct message_parser_settings *set)
{
	struct message_parser_ctx *ctx;

	ctx = message_parser_init_int(input, set);
	ctx->part_pool = part_pool;
	ctx->parts = ctx->part = p_new(part_pool, struct message_part, 1);
	ctx->next_part = &ctx->part->children;
	ctx->parse_next_block = parse_next_header_init;
	ctx->total_parts_count = 1;
	i_array_init(&ctx->next_part_stack, 4);
	return ctx;
}
message_parser_init(pool_t part_pool, struct istream *input,
		    const struct message_parser_settings *set)
{
	struct message_parser_ctx *ctx;

	ctx = message_parser_init_int(input, set);
	ctx->part_pool = part_pool;
	ctx->parts = ctx->part = p_new(part_pool, struct message_part, 1);
	ctx->next_part = &ctx->part->children;
	ctx->parse_next_block = parse_next_header_init;
	ctx->total_parts_count = 1;
	i_array_init(&ctx->next_part_stack, 4);
	return ctx;
}