qemu-devel
[Top][All Lists]
Advanced

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

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


From: Anthony Liguori
Subject: [Qemu-devel] Re: [PATCH 2/7] Introduce QError
Date: Fri, 30 Oct 2009 08:05:57 -0500
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

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.

>  Shouldn't this take a ... too?
  The problem is that its caller (qemu_error_structed()) also takes
a ..., I don't know how to pass the arguments to a second function with
variadic arguments w/o passing the va_list.

Yeah, this is fine.

Usually you provide two versions of variadic functions. One that takes an ... and one that takes a va_list.

--
Regards,

Anthony Liguori





reply via email to

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