[Xcb] Re: very first attempt of the keybinding
Josh Triplett
josh.trip at verizon.net
Fri May 6 00:57:49 PDT 2005
Vincent Torri wrote:
> One question, though:
>
> in atoms.c, there's following code in InternAtomFast:
>
> InternAtomFastCookie cookie;
>
> if((cookie.u.atom = InternAtomPredefined(name_len, name)).xid !=
> None)
> {
> cookie.tag = TAG_VALUE;
> return cookie;
> }
>
> I don't understand why you check cookie.u.atom, as you've just declared
> cookie. Its values should be random, shouldn't they ?
Ah, the joys of C. :) cookie.u.atom is first being assigned the result
of calling InternAtomPredefined, and then the xid member of that result
is checked against None with the != operator.
- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 251 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20050506/4fb66483/signature.pgp
More information about the xcb
mailing list