diff mbox series

[for-6.2,03/10] docs: qom: Fix autoptr expansion example

Message ID 20210729175554.686474-4-ehabkost@redhat.com
State New
Headers show
Series QOM documentation updates | expand

Commit Message

Eduardo Habkost July 29, 2021, 5:55 p.m. UTC
The wrong type name was being used.  The autoptr cleanup function
will be declared for the instance type, not the class type.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 docs/devel/qom.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Maydell Aug. 2, 2021, 12:16 p.m. UTC | #1
On Thu, 29 Jul 2021 at 18:59, Eduardo Habkost <ehabkost@redhat.com> wrote:
>
> The wrong type name was being used.  The autoptr cleanup function
> will be declared for the instance type, not the class type.
>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> ---
>  docs/devel/qom.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM
diff mbox series

Patch

diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst
index 3499a8ca3b6..7ef16d92ca6 100644
--- a/docs/devel/qom.rst
+++ b/docs/devel/qom.rst
@@ -304,7 +304,7 @@  This is equivalent to the following:
    typedef struct MyDevice MyDevice;
    typedef struct MyDeviceClass MyDeviceClass;
 
-   G_DEFINE_AUTOPTR_CLEANUP_FUNC(MyDeviceClass, object_unref)
+   G_DEFINE_AUTOPTR_CLEANUP_FUNC(MyDevice, object_unref)
 
    #define MY_DEVICE_GET_CLASS(void *obj) \
            OBJECT_GET_CLASS(MyDeviceClass, obj, TYPE_MY_DEVICE)