qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Glauber Costa <glommer@gmail.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] vmstate: add VMSTATE_ARRAY_UNSAFE
Date: Tue, 20 Oct 2009 00:46:40 -0200	[thread overview]
Message-ID: <5d6222a80910191946x1b516a10of27a4da477c0d3b3@mail.gmail.com> (raw)
In-Reply-To: <298287ae20c9cbd3f30f4997ac874a7cb28a7a54.1255979118.git.quintela@redhat.com>

On Mon, Oct 19, 2009 at 5:07 PM, Juan Quintela <quintela@redhat.com> wrote:
> Use offset given as an array of type given, without doing typechecking.
>
> +#define VMSTATE_ARRAY_UNSAFE(_field, _state, _num, _version, _info, _type) {\
> +    .name       = (stringify(_field)),                               \
> +    .version_id = (_version),                                        \
> +    .num        = (_num),                                            \
> +    .info       = &(_info),                                          \
> +    .size       = sizeof(_type),                                     \
> +    .flags      = VMS_ARRAY,                                         \
> +    .offset     = offsetof(_state, _field)                           \
> +}
> +
Since we are already being unsafe, can't we pass the size directly,
instead of a type?

-- 
Glauber  Costa.
"Free as in Freedom"
http://glommer.net

"The less confident you are, the more serious you have to act."

      reply	other threads:[~2009-10-20  2:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-19 19:07 [Qemu-devel] [PATCH 0/2] vmstate: u64 support Juan Quintela
2009-10-19 19:07 ` [Qemu-devel] [PATCH 1/2] " Juan Quintela
2009-10-20  2:44   ` Glauber Costa
2009-10-19 19:07 ` [Qemu-devel] [PATCH 2/2] vmstate: add VMSTATE_ARRAY_UNSAFE Juan Quintela
2009-10-20  2:46   ` Glauber Costa [this message]

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=5d6222a80910191946x1b516a10of27a4da477c0d3b3@mail.gmail.com \
    --to=glommer@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.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).