Skip to content

Commit

Permalink
docs/devel/qom.rst: Correct code style
Browse files Browse the repository at this point in the history
Per commit 067109a ("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>
Message-Id: <20230622101717.70468-1-philmd@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230630180423.558337-26-alex.bennee@linaro.org>
  • Loading branch information
philmd authored and stsquad committed Jul 3, 2023
1 parent 6aebb1f commit 307c0a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/devel/qom.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ features:
typedef DeviceClass MyDeviceClass;
typedef struct MyDevice
{
DeviceState parent;
DeviceState parent_obj;
int reg0, reg1, reg2;
} MyDevice;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 307c0a4

Please sign in to comment.