* [PATCH] docs/devel/qom.rst: Correct code style
@ 2023-06-22 10:17 Philippe Mathieu-Daudé
2023-06-23 12:07 ` Alex Bennée
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-06-22 10:17 UTC (permalink / raw)
To: qemu-devel
Cc: Eduardo Habkost, Daniel P. Berrangé, Juan Quintela,
Mark Cave-Ayland, Paolo Bonzini, qemu-trivial, Alex Bennée,
Philippe Mathieu-Daudé, BALATON Zoltan
Per commit 067109a11c ("docs/devel: mention the spacing requirement
for QOM"):
For a storage structure the first declaration should always be
called “parent_obj” and for a class structure the first member
should always be called “parent_class”
Adapt the QOM rST document accordingly.
Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
docs/devel/qom.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst
index c9237950d0..2828843058 100644
--- a/docs/devel/qom.rst
+++ b/docs/devel/qom.rst
@@ -26,7 +26,7 @@ features:
typedef DeviceClass MyDeviceClass;
typedef struct MyDevice
{
- DeviceState parent;
+ DeviceState parent_obj;
int reg0, reg1, reg2;
} MyDevice;
@@ -147,7 +147,7 @@ will also have a wrapper function to call it easily:
typedef struct MyDeviceClass
{
- DeviceClass parent;
+ DeviceClass parent_class;
void (*frobnicate) (MyDevice *obj);
} MyDeviceClass;
--
2.38.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] docs/devel/qom.rst: Correct code style
2023-06-22 10:17 [PATCH] docs/devel/qom.rst: Correct code style Philippe Mathieu-Daudé
@ 2023-06-23 12:07 ` Alex Bennée
0 siblings, 0 replies; 2+ messages in thread
From: Alex Bennée @ 2023-06-23 12:07 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Eduardo Habkost, Daniel P. Berrangé,
Juan Quintela, Mark Cave-Ayland, Paolo Bonzini, qemu-trivial,
BALATON Zoltan
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> Per commit 067109a11c ("docs/devel: mention the spacing requirement
> for QOM"):
>
> For a storage structure the first declaration should always be
> called “parent_obj” and for a class structure the first member
> should always be called “parent_class”
>
> Adapt the QOM rST document accordingly.
>
> Reported-by: BALATON Zoltan <balaton@eik.bme.hu>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Queued to docs/more-qom-docs, thanks.
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-06-23 12:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-22 10:17 [PATCH] docs/devel/qom.rst: Correct code style Philippe Mathieu-Daudé
2023-06-23 12:07 ` Alex Bennée
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).