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 <ehabk...@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