[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 4/4] docs/devel: Rules on #include in headers
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v2 4/4] docs/devel: Rules on #include in headers |
Date: |
Mon, 09 Jan 2023 13:01:27 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Bernhard Beschow <shentey@gmail.com> writes:
> Am 22. Dezember 2022 12:08:13 UTC schrieb Markus Armbruster
> <armbru@redhat.com>:
>>Rules for headers were proposed a long time ago, and generally liked:
>>
>> Message-ID: <87h9g8j57d.fsf@blackfin.pond.sub.org>
>> https://lists.nongnu.org/archive/html/qemu-devel/2016-03/msg03345.html
>>
>>Wortk them into docs/devel/style.rst.
>>
>>Suggested-by: Bernhard Beschow <shentey@gmail.com>
>>Signed-off-by: Markus Armbruster <armbru@redhat.com>
>>---
>> docs/devel/style.rst | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>>diff --git a/docs/devel/style.rst b/docs/devel/style.rst
>>index 7ddd42b6c2..68aa776930 100644
>>--- a/docs/devel/style.rst
>>+++ b/docs/devel/style.rst
>>@@ -293,6 +293,13 @@ that QEMU depends on.
>> Do not include "qemu/osdep.h" from header files since the .c file will have
>> already included it.
>>
>>+Headers should normally include everything they need beyond osdep.h.
>>+If exceptions are needed for some reason, they must be documented in
>>+the header. If all that's needed from a header is typedefs, consider
>>+putting those into qemu/typedefs.h instead of including the header.
>>+
>>+Cyclic inclusion is forbidden.
>>+
>
> Nice!
>
> I wonder if these should be bullet points like in your mail from 2016. I
> found them crystal clear since they looked like a todo list for review.
I tried to blend my change in with the existing text.
> Feel free to respin. Either way:
>
> Reviewed-by: Bernhard Beschow <shentey@gmail.com>
Thanks!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v2 4/4] docs/devel: Rules on #include in headers,
Markus Armbruster <=