From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3rBH-0001Ie-Cu for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:06:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3rBC-0001GW-Se for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:06:14 -0400 Received: from [199.232.76.173] (port=56996 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3rBC-0001GP-G9 for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:06:10 -0400 Received: from e32.co.us.ibm.com ([32.97.110.150]:50598) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N3rBB-00009W-Ur for qemu-devel@nongnu.org; Fri, 30 Oct 2009 09:06:10 -0400 Received: from d03relay01.boulder.ibm.com (d03relay01.boulder.ibm.com [9.17.195.226]) by e32.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id n9UD10FF002895 for ; Fri, 30 Oct 2009 07:01:00 -0600 Received: from d03av03.boulder.ibm.com (d03av03.boulder.ibm.com [9.17.195.169]) by d03relay01.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n9UD5xPN092502 for ; Fri, 30 Oct 2009 07:06:00 -0600 Received: from d03av03.boulder.ibm.com (loopback [127.0.0.1]) by d03av03.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id n9UD5whl022329 for ; Fri, 30 Oct 2009 07:05:59 -0600 Message-ID: <4AEAE4B5.8020009@us.ibm.com> Date: Fri, 30 Oct 2009 08:05:57 -0500 From: Anthony Liguori MIME-Version: 1.0 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> In-Reply-To: <4AEA125C.5040203@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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: Paolo Bonzini Cc: hollisb@linux.vnet.ibm.com, kraxel@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino 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