qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Eric Blake <eblake@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] DO_UPCAST confusion
Date: Thu, 22 Oct 2015 16:00:55 +0200	[thread overview]
Message-ID: <5628EC17.9060503@redhat.com> (raw)
In-Reply-To: <5628EABF.8060009@redhat.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256



On 22/10/2015 15:55, Eric Blake wrote:
> Or maybe container_of_first(), to make it obvious that the parent
> class is the first member.
> 
> But how often does it really matter whether the container of the
> parent class had the parent as the first member?  I guess we'll
> find out as we try to nuke DO_UPCAST.

It's just a compile-time check.  DO_UPCAST is basically a type-safe(r)
version of (Foo *)bar.

Paolo
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJWKOwUAAoJEL/70l94x66DS+gH/Rk7DXLNiYm0jhsgKwxfZHCn
sygpayCGxpiSJ1PeRlNwjCImt1+wazqohStogCxnMkvB8mcAY5C8tTxsShzh1eao
jEkGkwPcpDdR6bC5LSzot8uNI/GZEC1xEoXF8Zi6Y+t62LfL+hmKgydxrBNu4GHk
kzczEv/4DpLh2KsZOj/yOmuw9b3hn0z05wM5taZvr/zVWB2eqenTISUF4PttgSi/
QrZapdHM0kq2Y9iGdM2necIFWwRjSm+8Gjs/cdETp30gSCA+TqlFnGgD4+sW2lrM
C3gc5KzttgAuoNMkUNo7ibRV3P1qA/aiOZFzO4LXMrV69yox7ur8OrakXR8hOJA=
=J4SY
-----END PGP SIGNATURE-----

  reply	other threads:[~2015-10-22 14:01 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-21 22:49 [Qemu-devel] DO_UPCAST confusion Eric Blake
2015-10-22  7:26 ` Gerd Hoffmann
2015-10-22  9:58 ` Peter Maydell
2015-10-22 12:00   ` Markus Armbruster
2015-10-22 13:55     ` Eric Blake
2015-10-22 14:00       ` Paolo Bonzini [this message]
2015-10-22 14:48       ` Markus Armbruster

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=5628EC17.9060503@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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).