]> git.proxmox.com Git - mirror_qemu.git/commitdiff
modules: add module_obj() note to QOM docs
authorGerd Hoffmann <kraxel@redhat.com>
Thu, 24 Jun 2021 10:38:24 +0000 (12:38 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 9 Jul 2021 16:20:27 +0000 (18:20 +0200)
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
Message-Id: <20210624103836.2382472-23-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
docs/devel/qom.rst

index 42d0dc4f4da801e6c8f73a634bf15a88bf090f3e..e5fe3597cd823394392e065b6628b3aeb6ec9b8b 100644 (file)
@@ -87,6 +87,14 @@ specific type:
    #define MY_DEVICE(obj) \
       OBJECT_CHECK(MyDevice, obj, TYPE_MY_DEVICE)
 
+In case the ObjectClass implementation can be built as module a
+module_obj() line must be added to make sure qemu loads the module
+when the object is needed.
+
+.. code-block:: c
+
+   module_obj(TYPE_MY_DEVICE);
+
 Class Initialization
 ====================