-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Atom defined as c_ulong #95
Comments
The x11 crate implements Atom and others as c_ulong. See AltF02/x11-rs#95.
It's because |
Ah I see. I'm trying to figure out how those basic X types are defined now but it isn't simple. The type definitions depend mostly on In /* For the purpose of the structure definitions in this file,
we must redefine the following types in terms of Xmd.h's types, which may
include bit fields. All of these are #undef'd at the end of this file,
restoring the definitions in X.h. */ Then there's exceptions like this in /*
* Make XEventClass be a CARD32 for 64 bit servers. Don't affect client
* definition of XEventClass since that would be a library interface change.
* See the top of X.h for more _XSERVER64 magic.
*
* But, don't actually use the CARD32 type. We can't get it defined here
* without polluting the namespace.
*/
#ifdef _XSERVER64
typedef unsigned int XEventClass;
#else
typedef unsigned long XEventClass;
#endif Found this comment https://gitlab.freedesktop.org/xorg/xserver/issues/553#note_94062
To me it looks like X clients use 64 bit integers for some types, but the data structures communicating with the X server ( |
I am confused with the definition of Atom (and friends) in xlib.rs. The X protocol specification says it should be a 32 bit value. That is how it is defined in Xproto.h for me:
On my 64 bit machine,
c_ulong
ends up as au64
. Can anyone shed some light on this?The text was updated successfully, but these errors were encountered: