Re: [PATCH v5 02/10] object: qom module support

2020-07-22 Thread Gerd Hoffmann
> > +ObjectClass *module_object_class_by_name(const char *typename) > > Re-reading this, it occurred to me that typename is a keyword in C++. > > I don't know if we want to make it a rule to not use C++ keywords just in > case we would some day compile that code with a C++ compiler. If we want

Re: [PATCH v5 02/10] object: qom module support

2020-07-22 Thread Christophe de Dinechin
On 2020-06-24 at 15:10 CEST, Gerd Hoffmann wrote... > Little helper function to load modules on demand. In most cases adding > module loading support for devices and other objects is just > s/object_class_by_name/module_object_class_by_name/ in the right spot. > > Signed-off-by: Gerd Hoffmann

Re: [PATCH v5 02/10] object: qom module support

2020-07-21 Thread Daniel P . Berrangé
On Mon, Jul 20, 2020 at 04:20:55PM +0200, Christophe de Dinechin wrote: > > On 2020-06-24 at 15:10 CEST, Gerd Hoffmann wrote... > > Little helper function to load modules on demand. In most cases adding > > module loading support for devices and other objects is just > >

Re: [PATCH v5 02/10] object: qom module support

2020-07-21 Thread Gerd Hoffmann
Hi, > > +ObjectClass *module_object_class_by_name(const char *typename) > > +{ > > +ObjectClass *oc; > > + > > +oc = object_class_by_name(typename); > > +#ifdef CONFIG_MODULES > > +if (!oc) { > > +module_load_qom_one(typename); > > +oc =

Re: [PATCH v5 02/10] object: qom module support

2020-07-20 Thread Christophe de Dinechin
On 2020-06-24 at 15:10 CEST, Gerd Hoffmann wrote... > Little helper function to load modules on demand. In most cases adding > module loading support for devices and other objects is just > s/object_class_by_name/module_object_class_by_name/ in the right spot. > > Signed-off-by: Gerd Hoffmann

[PATCH v5 02/10] object: qom module support

2020-06-24 Thread Gerd Hoffmann
Little helper function to load modules on demand. In most cases adding module loading support for devices and other objects is just s/object_class_by_name/module_object_class_by_name/ in the right spot. Signed-off-by: Gerd Hoffmann --- include/qom/object.h | 12 qom/object.c