Re: [PATCH 2/4] qom: provide convenient macros for declaring and defining types

2020-08-11 Thread Eduardo Habkost
I've just noticed this: On Thu, Jul 23, 2020 at 07:14:08PM +0100, Daniel P. Berrangé wrote: > When creating new QOM types, there is a lot of boilerplate code that > must be repeated using a standard pattern. This is tedious to write > and liable to suffer from subtle inconsistencies. Thus it woul

Re: [PATCH 2/4] qom: provide convenient macros for declaring and defining types

2020-08-08 Thread Eduardo Habkost
There are implicit requirements in the macros that will be a problem in some existing type definitions: On Thu, Jul 23, 2020 at 07:14:08PM +0100, Daniel P. Berrangé wrote: [...] > +/** > + * OBJECT_DECLARE_TYPE: > + * @ModuleObjName: the object name with initial capitalization > + * @module_obj_n

Re: [PATCH 2/4] qom: provide convenient macros for declaring and defining types

2020-07-24 Thread Daniel P . Berrangé
On Thu, Jul 23, 2020 at 02:23:54PM -0500, Eric Blake wrote: > On 7/23/20 1:14 PM, Daniel P. Berrangé wrote: > > When creating new QOM types, there is a lot of boilerplate code that > > must be repeated using a standard pattern. This is tedious to write > > and liable to suffer from subtle inconsist

Re: [PATCH 2/4] qom: provide convenient macros for declaring and defining types

2020-07-23 Thread Eric Blake
On 7/23/20 1:14 PM, Daniel P. Berrangé wrote: When creating new QOM types, there is a lot of boilerplate code that must be repeated using a standard pattern. This is tedious to write and liable to suffer from subtle inconsistencies. Thus it would benefit from some simple automation. QOM was loos

[PATCH 2/4] qom: provide convenient macros for declaring and defining types

2020-07-23 Thread Daniel P . Berrangé
When creating new QOM types, there is a lot of boilerplate code that must be repeated using a standard pattern. This is tedious to write and liable to suffer from subtle inconsistencies. Thus it would benefit from some simple automation. QOM was loosely inspired by GLib's GObject, and indeed GObje