qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eduardo Habkost
Subject: [PATCH for-6.2 03/10] docs: qom: Fix autoptr expansion example
Date: Thu, 29 Jul 2021 13:55:47 -0400

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(-)

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)
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]