From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqPRJ-0006IW-Ui for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:00:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QqPRE-0000So-L0 for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:00:17 -0400 Received: from mail-yw0-f45.google.com ([209.85.213.45]:61119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QqPRD-0000R1-5Z for qemu-devel@nongnu.org; Mon, 08 Aug 2011 09:00:11 -0400 Received: by ywf9 with SMTP id 9so288202ywf.4 for ; Mon, 08 Aug 2011 06:00:09 -0700 (PDT) Message-ID: <4E3FDDD6.9070501@codemonkey.ws> Date: Mon, 08 Aug 2011 08:00:06 -0500 From: Anthony Liguori MIME-Version: 1.0 References: <1312808190-31074-1-git-send-email-avi@redhat.com> In-Reply-To: <1312808190-31074-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Introduce short names for fixed width integer types List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org On 08/08/2011 07:56 AM, Avi Kivity wrote: > QEMU deals with a lot of fixed width integer types; their names > (uint64_t etc) are clumsy to use and take up a lot of space. > > Following Linux, introduce shorter names, for example U64 for > uint64_t. Except Linux uses lower case letters. I personally think Linux style is wrong here. The int8_t types are standard types. Besides, we save lots of characters by using 4-space tabs instead of 8-space tabs. We can afford to spend some of those saved characters on using proper type names :-) Regards, Anthony Liguori > > Signed-off-by: Avi Kivity > --- > qemu-common.h | 9 +++++++++ > 1 files changed, 9 insertions(+), 0 deletions(-) > > diff --git a/qemu-common.h b/qemu-common.h > index 0fdecf1..52a2300 100644 > --- a/qemu-common.h > +++ b/qemu-common.h > @@ -112,6 +112,15 @@ static inline char *realpath(const char *path, char *resolved_path) > int qemu_main(int argc, char **argv, char **envp); > #endif > > +typedef int8_t S8; > +typedef uint8_t U8; > +typedef int16_t S16; > +typedef uint16_t U16; > +typedef int32_t S32; > +typedef uint32_t U32; > +typedef int64_t S64; > +typedef uint64_t U64; > + > /* bottom halves */ > typedef void QEMUBHFunc(void *opaque); >