On Mon, Oct 19, 2009 at 5:07 PM, Juan Quintela <quint...@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 via email to