qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 00/18] qapi/qom: QAPIfy object-add


From: Paolo Bonzini
Subject: Re: [PATCH 00/18] qapi/qom: QAPIfy object-add
Date: Thu, 3 Dec 2020 19:01:34 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0

On 03/12/20 18:43, Kevin Wolf wrote:
I think I'd want to do step 2 and 3 combined, because converting
user-creatable objects to oc->configure means manually writing the
configure function that will be generated from QAPI in step 3. Writing
code just to throw it away isn't my favourite pastime.

It would only be a couple lines of extra code, but yeah you don't have to do it. It still is clearer to show the steps one by one as they are logically separate and it shows what (modulo inlining) the generated code ends up doing.

That said having no setter might simplify the introduction of field properties too (no allow_set to worry about); perhaps that's a good reason to do the oc->configure conversion earlier rather than later, especially if QAPI code generation ends up taking a bit longer.

Another good reason is to make sure the API is stable before moving to generated code, especially with respect to inheritance.

Paolo




reply via email to

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