[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: [PATCH 2/7] Introduce QError

From: Jamie Lokier
Subject: Re: [Qemu-devel] Re: [PATCH 2/7] Introduce QError
Date: Fri, 30 Oct 2009 02:25:33 +0000
User-agent: Mutt/1.5.13 (2006-08-11)

Paolo Bonzini wrote:
> On 10/29/2009 09:48 PM, Luiz Capitulino wrote:
> >>  va_list doesn't need to be a pointer.
> >
> >  Ok, but if this is going to be a public interface, I think it's
> >better to va_copy() before passing it to qobject_from_json_va() then.
> It is standard to pass a va_list by value without doing va_copy in the 
> caller.

That's right, just like:

    va_list ap;
    va_start(ap, format);
    vfprintf(stderr, format, ap);   /* <- passed by value */

You only need va_copy() is you're going to use some more it after
passing it to the function.

There should be one va_end() for every va_start() plus every va_copy().

-- Jamie

reply via email to

[Prev in Thread] Current Thread [Next in Thread]