On Fri, 30 Oct 2009 08:05:57 -0500 Anthony Liguori <aligu...@us.ibm.com> wrote:
> 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. This is what is going here, qemu_error_structed() take a ... and qobject_from_json_va() takes a va_list.