abg-writer: Refactor write_corpus_group API
authorMatthias Maennich <maennich@google.com>
Tue, 21 May 2019 04:39:17 +0000 (05:39 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 22 May 2019 12:33:45 +0000 (14:33 +0200)
commit6aeed171c1ae4775b96666f17bb4f82a7ac80ea1
tree2459b098752c8f39939819da489a00995ea1ef62
parent948f27480fce83ae8de3ca77ca1179646aa07728
abg-writer: Refactor write_corpus_group API

Introduce a new call overload for write_corpus_group that follows the
parameter order context, object (i.e. corpus_group), indent.

Deprecate all other overloads that were part of the API and mostly
forward them to the new overload. That effort is made to ensure
write_context is always provided. write_context allows access to all
options that influence the output format.

* include/abg-writer.h (write_corpus_group): Introduce new
overload write_corpus_group(ctxt, corpus_group, indent) and
deprecate all others.
* src/abg-writer.cc (write_corpus_group): Likewise for the
definitions and adjust.
* tools/abidw.cc (load_kernel_corpus_group_and_write_abixml):
Migrate to new API of write_corpus_group()

Signed-off-by: Matthias Maennich <maennich@google.com>
include/abg-writer.h
src/abg-writer.cc
tools/abidw.cc