libXrandr Status return value confusion
mhopf at suse.de
Thu Jan 7 07:07:41 PST 2010
On Jan 05, 10 20:20:52 +0100, Michel Dänzer wrote:
> There seems to be some confusion in libXrandr as to what a Status return
> value is supposed to mean. Some functions just return rep.status (so 0
> means success, non-0 failure), others return True (non-0, success) or
> False (0, failure).
> Could the return value of the functions returning True/False be changed
> to Bool without breaking ABI? Any other ideas for cleaning this up?
Those functions I found to return rep.status have the type Status
However, I don't claim I understand the header file logic. Bool is
typedef'ed in Xdefs.h, while both Status *and* Bool are #define'ed in
But even if both were typedef'ed you wouldn't benefit from it -
C doesn't distinguish between different types that all boil down to the
same primitive type.
Matthias Hopf <mhopf at suse.de> __ __ __
Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ mat at mshopf.de
Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de
More information about the xorg-devel