Message ID | 20210729175554.686474-4-ehabkost@redhat.com |
---|---|
State | New |
Headers | show |
Series | QOM documentation updates | expand |
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 --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)
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(-)