> > +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 d
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
>
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
> > s/object_class_by_name/mo
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 = object_class_by_name(typename)
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
>
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