From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3rqe-0001iv-Vi for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:49:01 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3rqZ-0001h7-5q for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:48:59 -0400 Received: from [199.232.76.173] (port=52675 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3rqY-0001gt-2J for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:48:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16105) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3rqX-0005u5-KB for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:48:53 -0400 Date: Fri, 30 Oct 2009 11:48:34 -0200 From: Luiz Capitulino Message-ID: <20091030114834.5eb5a7cc@doriath> In-Reply-To: <4AEAE4B5.8020009@us.ibm.com> References: <1256841750-15228-1-git-send-email-lcapitulino@redhat.com> <1256841750-15228-3-git-send-email-lcapitulino@redhat.com> <4AE9F794.4030204@us.ibm.com> <20091029184834.4d6dd8a6@doriath> <4AEA125C.5040203@redhat.com> <4AEAE4B5.8020009@us.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 2/7] Introduce QError List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Paolo Bonzini , hollisb@linux.vnet.ibm.com, qemu-devel@nongnu.org, kraxel@redhat.com On Fri, 30 Oct 2009 08:05:57 -0500 Anthony Liguori 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.