qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Felix Wu <flwu@google.com>
Cc: pbonzini@redhat.com, berrange@redhat.com,
	peter.maydell@linaro.org, eduardo@habkost.net, peterx@redhat.com,
	david@redhat.com, qemu-devel@nongnu.org,
	Roman Kiryanov <rkir@google.com>,
	Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH 1/2] qom: Rename Object::class into Object::klass
Date: Tue, 25 Jun 2024 04:20:46 +0200	[thread overview]
Message-ID: <d82916f9-3f5c-43f1-a545-0f5a30c8459e@linaro.org> (raw)
In-Reply-To: <20240624204400.103747-1-flwu@google.com>

Hi Felix,

On 24/6/24 22:43, Felix Wu wrote:
> From: Roman Kiryanov <rkir@google.com>
> 
> 'class' is a C++ keyword and it prevents from
> using the QEMU headers with a C++ compiler.
> 
> Google-Bug-Id: 331190993

I asked Roman twice about this tag meaning:
https://lore.kernel.org/qemu-devel/e865d8e3-e768-4b1f-86d3-aeabe8f1d511@linaro.org/
https://lore.kernel.org/qemu-devel/09b7e7e1-30a6-49d0-a5f8-9cfc62884c55@linaro.org/
Since you are taking his work, do you mind clarifying?

Please include a cover letter for your series:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#include-a-meaningful-cover-letter

Also for headers refactors, enabling scripts/git.orderfile helps
reviewers.

Since you are posting different C++ enablement cleanups,
I suggest you add a section in our docs/devel/style.rst
requesting to keep headers C++ compatible, by not using
C++ reserved keywords, etc...
In particular because the mainstream project is not build-testing
for C++, thus we will likely merge patches breaking C++ and
make your life harder. That said, a C++ header smoke-build job
in our CI could help.

> Change-Id: I9ab7d2d77edef654a9c7b7cb9cd01795a6ed65a2
> Signed-off-by: Felix Wu <flwu@google.com>
> Signed-off-by: Roman Kiryanov <rkir@google.com>
> ---
>   hw/core/qdev-properties-system.c |  2 +-
>   include/exec/memory.h            |  2 +-
>   include/qom/object.h             |  2 +-
>   qom/object.c                     | 90 ++++++++++++++++----------------
>   4 files changed, 48 insertions(+), 48 deletions(-)


> diff --git a/include/qom/object.h b/include/qom/object.h
> index 13d3a655dd..7afdb261a8 100644
> --- a/include/qom/object.h
> +++ b/include/qom/object.h
> @@ -153,7 +153,7 @@ struct ObjectClass
>   struct Object
>   {
>       /* private: */
> -    ObjectClass *class;
> +    ObjectClass *klass;
>       ObjectFree *free;
>       GHashTable *properties;
>       uint32_t ref;

I suppose the OBJECT_CLASS / OBJECT_CLASS_CHECK / OBJECT_GET_CLASS
macros aren't compiled so "class" isn't a problem there.

Since it isn't worst than our INTERFACE_CLASS() use:

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Regards,

Phil.


  parent reply	other threads:[~2024-06-25  2:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 20:43 [PATCH 1/2] qom: Rename Object::class into Object::klass Felix Wu
2024-06-24 20:44 ` [PATCH 2/2] include/qom: Rename typename into type_name Felix Wu
2024-06-25  2:20 ` Philippe Mathieu-Daudé [this message]
2024-06-25  9:23   ` [PATCH 1/2] qom: Rename Object::class into Object::klass Peter Maydell
2024-06-25  9:36     ` Daniel P. Berrangé
2024-06-25  7:15 ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d82916f9-3f5c-43f1-a545-0f5a30c8459e@linaro.org \
    --to=philmd@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=david@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=flwu@google.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rkir@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).