* Re: [PATCH] docs/devel: Fix coding style in style.rst
2023-07-10 9:26 [PATCH] docs/devel: Fix coding style in style.rst Thomas Huth
@ 2023-07-10 9:32 ` Konstantin Kostiuk
2023-07-10 9:49 ` Markus Armbruster
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Konstantin Kostiuk @ 2023-07-10 9:32 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Daniel P. Berrangé, qemu-trivial,
Alex Bennée, Markus Armbruster, Philippe Mathieu-Daudé,
Juan Quintela
[-- Attachment #1: Type: text/plain, Size: 1598 bytes --]
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>
On Mon, Jul 10, 2023 at 12:26 PM Thomas Huth <thuth@redhat.com> wrote:
> As defined earlier in this file, the opening curly brace of
> functions should be placed on a separate line. So we should
> do it in the examples here, too.
>
> Reported-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> Fixes: 821f296756 ("docs: document use of automatic cleanup functions in
> glib")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> docs/devel/style.rst | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/docs/devel/style.rst b/docs/devel/style.rst
> index aa5e083ff8..3cfcdeb9cd 100644
> --- a/docs/devel/style.rst
> +++ b/docs/devel/style.rst
> @@ -567,7 +567,8 @@ For example, instead of
>
> .. code-block:: c
>
> - int somefunc(void) {
> + int somefunc(void)
> + {
> int ret = -1;
> char *foo = g_strdup_printf("foo%", "wibble");
> GList *bar = .....
> @@ -588,7 +589,8 @@ Using g_autofree/g_autoptr enables the code to be
> written as:
>
> .. code-block:: c
>
> - int somefunc(void) {
> + int somefunc(void)
> + {
> g_autofree char *foo = g_strdup_printf("foo%", "wibble");
> g_autoptr (GList) bar = .....
>
> @@ -613,7 +615,8 @@ are still some caveats to beware of
>
> .. code-block:: c
>
> - char *somefunc(void) {
> + char *somefunc(void)
> + {
> g_autofree char *foo = g_strdup_printf("foo%", "wibble");
> g_autoptr (GList) bar = .....
>
> --
> 2.39.3
>
>
[-- Attachment #2: Type: text/html, Size: 2304 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/devel: Fix coding style in style.rst
2023-07-10 9:26 [PATCH] docs/devel: Fix coding style in style.rst Thomas Huth
2023-07-10 9:32 ` Konstantin Kostiuk
@ 2023-07-10 9:49 ` Markus Armbruster
2023-07-10 10:06 ` Philippe Mathieu-Daudé
2023-07-10 10:29 ` Alex Bennée
3 siblings, 0 replies; 5+ messages in thread
From: Markus Armbruster @ 2023-07-10 9:49 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Daniel P. Berrangé, qemu-trivial,
Alex Bennée, Philippe Mathieu-Daudé, Juan Quintela,
Konstantin Kostiuk
Thomas Huth <thuth@redhat.com> writes:
> As defined earlier in this file, the opening curly brace of
> functions should be placed on a separate line. So we should
> do it in the examples here, too.
>
> Reported-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> Fixes: 821f296756 ("docs: document use of automatic cleanup functions in glib")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> docs/devel/style.rst | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/docs/devel/style.rst b/docs/devel/style.rst
> index aa5e083ff8..3cfcdeb9cd 100644
> --- a/docs/devel/style.rst
> +++ b/docs/devel/style.rst
> @@ -567,7 +567,8 @@ For example, instead of
>
> .. code-block:: c
>
> - int somefunc(void) {
> + int somefunc(void)
> + {
> int ret = -1;
> char *foo = g_strdup_printf("foo%", "wibble");
> GList *bar = .....
> @@ -588,7 +589,8 @@ Using g_autofree/g_autoptr enables the code to be written as:
>
> .. code-block:: c
>
> - int somefunc(void) {
> + int somefunc(void)
> + {
> g_autofree char *foo = g_strdup_printf("foo%", "wibble");
> g_autoptr (GList) bar = .....
>
> @@ -613,7 +615,8 @@ are still some caveats to beware of
>
> .. code-block:: c
>
> - char *somefunc(void) {
> + char *somefunc(void)
> + {
> g_autofree char *foo = g_strdup_printf("foo%", "wibble");
> g_autoptr (GList) bar = .....
Reviewed-by: Markus Armbruster <armbru@redhat.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/devel: Fix coding style in style.rst
2023-07-10 9:26 [PATCH] docs/devel: Fix coding style in style.rst Thomas Huth
2023-07-10 9:32 ` Konstantin Kostiuk
2023-07-10 9:49 ` Markus Armbruster
@ 2023-07-10 10:06 ` Philippe Mathieu-Daudé
2023-07-10 10:29 ` Alex Bennée
3 siblings, 0 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-10 10:06 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Daniel P. Berrangé
Cc: qemu-trivial, Alex Bennée, Markus Armbruster, Juan Quintela,
Konstantin Kostiuk
On 10/7/23 11:26, Thomas Huth wrote:
> As defined earlier in this file, the opening curly brace of
> functions should be placed on a separate line. So we should
> do it in the examples here, too.
>
> Reported-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> Fixes: 821f296756 ("docs: document use of automatic cleanup functions in glib")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> docs/devel/style.rst | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] docs/devel: Fix coding style in style.rst
2023-07-10 9:26 [PATCH] docs/devel: Fix coding style in style.rst Thomas Huth
` (2 preceding siblings ...)
2023-07-10 10:06 ` Philippe Mathieu-Daudé
@ 2023-07-10 10:29 ` Alex Bennée
3 siblings, 0 replies; 5+ messages in thread
From: Alex Bennée @ 2023-07-10 10:29 UTC (permalink / raw)
To: Thomas Huth
Cc: qemu-devel, Daniel P. Berrangé, qemu-trivial,
Markus Armbruster, Philippe Mathieu-Daudé, Juan Quintela,
Konstantin Kostiuk
Thomas Huth <thuth@redhat.com> writes:
> As defined earlier in this file, the opening curly brace of
> functions should be placed on a separate line. So we should
> do it in the examples here, too.
>
> Reported-by: Konstantin Kostiuk <kkostiuk@redhat.com>
> Fixes: 821f296756 ("docs: document use of automatic cleanup functions in glib")
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
^ permalink raw reply [flat|nested] 5+ messages in thread