qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 09/12] qapi/gen: move write method to QAPIGenC, make fname a


From: Markus Armbruster
Subject: Re: [PATCH 09/12] qapi/gen: move write method to QAPIGenC, make fname a str
Date: Wed, 16 Dec 2020 11:31:31 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

John Snow <jsnow@redhat.com> writes:

> QAPIGenC and QAPIGenH in particular depend on fname being defined, but
> we have a usage of QAPIGenCCode that isn't intended to be associated
> with a particular file.

Which one?

Hmm, it's this one:

    class QAPISchemaGenCommandVisitor(QAPISchemaModularCVisitor):
        def __init__(self, prefix: str):
            super().__init__(
                prefix, 'qapi-commands',
                ' * Schema-defined QAPI/QMP commands', None, __doc__)
--->        self._regy = QAPIGenCCode(None)
            self._visited_ret_types: Dict[QAPIGenC, Set[QAPISchemaType]] = {}

Let me try to get rid of it.

> No problem, move the write method down to the class that actually needs
> it, and keep QAPIGenCCode more abstract.
>
> Signed-off-by: John Snow <jsnow@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]