[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH 2/7] Introduce QError
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] Re: [PATCH 2/7] Introduce QError |
Date: |
Fri, 30 Oct 2009 11:48:34 -0200 |
On Fri, 30 Oct 2009 08:05:57 -0500
Anthony Liguori <address@hidden> 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.
[Qemu-devel] [PATCH 3/7] monitor: QError support, Luiz Capitulino, 2009/10/29
[Qemu-devel] [PATCH 4/7] QError: Add QERR_DEV_NFOUND, Luiz Capitulino, 2009/10/29
[Qemu-devel] [PATCH 5/7] qdev: Use QError for not found error, Luiz Capitulino, 2009/10/29
[Qemu-devel] [PATCH 6/7] QError: Add do_info_balloon() errors, Luiz Capitulino, 2009/10/29
[Qemu-devel] [PATCH 7/7] monitor: do_info_balloon(): use QError, Luiz Capitulino, 2009/10/29
[Qemu-devel] Re: [RFC 0/7] QError v1, Paolo Bonzini, 2009/10/29