From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43410) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcyN7-0004qe-7U for qemu-devel@nongnu.org; Tue, 20 Dec 2011 07:00:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RcyMx-0007eO-PM for qemu-devel@nongnu.org; Tue, 20 Dec 2011 07:00:41 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:38431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RcyMx-0007eK-Hn for qemu-devel@nongnu.org; Tue, 20 Dec 2011 07:00:31 -0500 Received: by iagj37 with SMTP id j37so11451187iag.4 for ; Tue, 20 Dec 2011 04:00:30 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4EF078DA.2090302@redhat.com> Date: Tue, 20 Dec 2011 13:00:26 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1319735193-4718-1-git-send-email-mdroth@linux.vnet.ibm.com> <1319735193-4718-2-git-send-email-mdroth@linux.vnet.ibm.com> <4EF06D87.9000809@redhat.com> <4EF074E3.1090505@redhat.com> In-Reply-To: <4EF074E3.1090505@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 01/10] qapi: add Visitor interfaces for uint*_t and int*_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael Roth , qemu-devel , Juan Quintela On 12/20/2011 12:43 PM, Paolo Bonzini wrote: > > 1) You can still add a vtable to QEMUFile for "visit_type_int*" and > "visit_type_uint*". But this vtable doesn't need start/end callbacks. Here I meant something simple like: void (*visit_type_int16) (QEMUFile *f, int16_t *x); that is really the same as qemu_{get,put}_be16s and friends. It may even be not a vtable, but a function that dispatches based on the existing get_buffer/put_buffer callbacks: note that one of them is always NULL. Which also means that the is_write field is superfluous. So much cleanup to do. :( Paolo