Marc-André Lureau <[email protected]> writes:

> Add helpers to wrap generated code with #if/#endif lines.
>
> A later patch wants to use QAPIGen for generating C snippets rather
> than full C files with copyright headers etc.  Splice in class
> QAPIGenCCode between QAPIGen and QAPIGenC.
>
> Add a 'with' statement context manager that will be used to wrap
> generator visitor methods.  The manager will check if code was
> generated before adding #if/#endif lines on QAPIGenCSnippet
> objects. Used in the following patches.
>
> Signed-off-by: Marc-André Lureau <[email protected]>

Reviewed-by: Markus Armbruster <[email protected]>

Reply via email to