Skip to content
Snippets Groups Projects
Commit 307c0a4a authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Alex Bennée
Browse files

docs/devel/qom.rst: Correct code style


Per commit 067109a1 ("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: default avatarBALATON Zoltan <balaton@eik.bme.hu>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20230622101717.70468-1-philmd@linaro.org>
Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-26-alex.bennee@linaro.org>
parent 6aebb1f6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment