Message ID | 20200916193101.511600-1-ehabkost@redhat.com |
---|---|
Headers | show |
Series | qom: Replace INTERFACE_CHECK with OBJECT_CHECK | expand |
Eduardo Habkost <ehabkost@redhat.com> writes: > This series replaces INTERFACE_CHECK with OBJECT_CHECK because > both macros are exactly the same. See also issue#2 in Subject: Issues around TYPE_INTERFACE Date: Tue, 12 Mar 2019 11:50:54 +0100 Message-ID: <87h8c82woh.fsf@dusky.pond.sub.org> https://lists.nongnu.org/archive/html/qemu-devel/2019-03/msg03840.html > The last patch is a new run of the OBJECT_CHECK -> > DECLARE*_CHECKER* converter script that will convert the former > INTERFACE_CHECK-based macros.
On 9/16/20 11:31 PM, Marc-André Lureau wrote: > Hi > > On Wed, Sep 16, 2020 at 11:35 PM Eduardo Habkost <ehabkost@redhat.com > <mailto:ehabkost@redhat.com>> wrote: > > This series replaces INTERFACE_CHECK with OBJECT_CHECK because > both macros are exactly the same. > > The last patch is a new run of the OBJECT_CHECK -> > DECLARE*_CHECKER* converter script that will convert the former > INTERFACE_CHECK-based macros. > > > Well, at least having a different macro allows to tweak qom > implementation or replace it with something different more easily. > > I have some wip branch somewhere where I actually made Interface a > different beast than Object (it was saving some fields, and avoiding > some potentially wrong casts iirc - I didn't bother to upstream that > yet). Also I have a different branch where I played with GObject to > replace qom. In both cases, your proposal would have, or would make, the > work more complicated. Considering "wip branch not bothered to upstream" as "fork", your comment from [*] applies here... You can't blame upstream from doing cleanups and modernization, or stagnating. Forks are forks, with all the pain they carry. If they want to avoid the maintenance cost, they have to do the extra effort to get it upstream. This is also a "sneaky way" to remind them that effort is better spent in this direction. [*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg720284.html
Hi On Thu, Sep 17, 2020 at 11:19 AM Philippe Mathieu-Daudé <philmd@redhat.com> wrote: > On 9/16/20 11:31 PM, Marc-André Lureau wrote: > > Hi > > > > On Wed, Sep 16, 2020 at 11:35 PM Eduardo Habkost <ehabkost@redhat.com > > <mailto:ehabkost@redhat.com>> wrote: > > > > This series replaces INTERFACE_CHECK with OBJECT_CHECK because > > both macros are exactly the same. > > > > The last patch is a new run of the OBJECT_CHECK -> > > DECLARE*_CHECKER* converter script that will convert the former > > INTERFACE_CHECK-based macros. > > > > > > Well, at least having a different macro allows to tweak qom > > implementation or replace it with something different more easily. > > > > I have some wip branch somewhere where I actually made Interface a > > different beast than Object (it was saving some fields, and avoiding > > some potentially wrong casts iirc - I didn't bother to upstream that > > yet). Also I have a different branch where I played with GObject to > > replace qom. In both cases, your proposal would have, or would make, the > > work more complicated. > > Considering "wip branch not bothered to upstream" as "fork", > your comment from [*] applies here... > > You can't blame upstream from doing cleanups and modernization, or > stagnating. Forks are forks, with all the pain they carry. If they > want to avoid the maintenance cost, they have to do the extra effort > to get it upstream. This is also a "sneaky way" to remind them that > effort is better spent in this direction. > > [*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg720284.html > > Fair enough. Note I didn't nack it, but in general the proposal seems to blurry some worthy semantic difference between object & interface. Maybe #define alias INTERFACE_CHECK with OBJECT_CHECK instead ?
On Thu, Sep 17, 2020 at 11:25:30AM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Sep 17, 2020 at 11:19 AM Philippe Mathieu-Daudé <philmd@redhat.com> > wrote: > > > On 9/16/20 11:31 PM, Marc-André Lureau wrote: > > > Hi > > > > > > On Wed, Sep 16, 2020 at 11:35 PM Eduardo Habkost <ehabkost@redhat.com > > > <mailto:ehabkost@redhat.com>> wrote: > > > > > > This series replaces INTERFACE_CHECK with OBJECT_CHECK because > > > both macros are exactly the same. > > > > > > The last patch is a new run of the OBJECT_CHECK -> > > > DECLARE*_CHECKER* converter script that will convert the former > > > INTERFACE_CHECK-based macros. > > > > > > > > > Well, at least having a different macro allows to tweak qom > > > implementation or replace it with something different more easily. > > > > > > I have some wip branch somewhere where I actually made Interface a > > > different beast than Object (it was saving some fields, and avoiding > > > some potentially wrong casts iirc - I didn't bother to upstream that > > > yet). Also I have a different branch where I played with GObject to > > > replace qom. In both cases, your proposal would have, or would make, the > > > work more complicated. > > > > Considering "wip branch not bothered to upstream" as "fork", > > your comment from [*] applies here... > > > > You can't blame upstream from doing cleanups and modernization, or > > stagnating. Forks are forks, with all the pain they carry. If they > > want to avoid the maintenance cost, they have to do the extra effort > > to get it upstream. This is also a "sneaky way" to remind them that > > effort is better spent in this direction. > > > > [*] https://www.mail-archive.com/qemu-devel@nongnu.org/msg720284.html > > > > > Fair enough. Note I didn't nack it, but in general the proposal seems to > blurry some worthy semantic difference between object & interface. Maybe > #define alias INTERFACE_CHECK with OBJECT_CHECK instead ? I'm actually considering deleting INTERFACE_CHECK and OBJECT_CHECK completely after we finish the boilerplate conversion, and tell everybody to use OBJECT_DECLARE_INTERFACE/OBJECT_DECLARE_TYPE instead.