qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 0/3] Purge the silly GLib Basic Types


From: Michael Tokarev
Subject: Re: [Qemu-devel] [PATCH 0/3] Purge the silly GLib Basic Types
Date: Sat, 19 Jan 2013 14:35:50 +0400
User-agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:17.0) Gecko/17.0 Icedove/17.0

19.01.2013 13:33, Blue Swirl wrote:
On Fri, Jan 18, 2013 at 4:17 PM, Anthony Liguori <address@hidden> wrote:
Markus Armbruster <address@hidden> writes:

See PATCH 1/3 for rationale.

Markus Armbruster (3):
   Purge the silly GLib "Basic Types", except for gboolean
   Purge GLib's gboolean, it's a trap for the unwary
   checkpatch: Keep out the GLib silliness we just purged

Changing QEMU code to work around checkpatch's failing is insane.

When interacting with glib, use glib types.  Not using those types just
makes the code more difficult to understand.

While the types are indeed useless and even cause problems (gboolean),
I agree with Anthony. It's the same as using DWORD for Win32 APIs.

Actually it is far from DWORD.  DWORD is like uint32_t, where no
standard C type matches (since these depends on the word size etc).
So in Win32, these DWORDs are justified.

With GLib, things are sillier than that, since they redefine _standard_
C types, without gaining anything in portability.

/mjt



reply via email to

[Prev in Thread] Current Thread [Next in Thread]