[Xcb] [PATCH 2/2] Remove constant definition

Eamon Walsh ewalsh.mailinglists at gmail.com
Mon Jan 25 20:25:12 PST 2010


Julien Danjou wrote:
> At 1264380897 time_t, Eamon Walsh wrote:
>   
>>> -    /* Basic constants */
>>> -    PyModule_AddIntConstant(m, "X_PROTOCOL", X_PROTOCOL);
>>> -    PyModule_AddIntConstant(m, "X_PROTOCOL_REVISION", X_PROTOCOL_REVISION);
>>> -    PyModule_AddIntConstant(m, "X_TCP_PORT", X_TCP_PORT);
>>> -    PyModule_AddIntConstant(m, "NONE", XCB_NONE);
>>> -    PyModule_AddIntConstant(m, "CopyFromParent", XCB_COPY_FROM_PARENT);
>>> -    PyModule_AddIntConstant(m, "CurrentTime", XCB_CURRENT_TIME);
>>> -    PyModule_AddIntConstant(m, "NoSymbol", XCB_NO_SYMBOL);
>>> -
>>>       
>> The constants above are defined in xcb.h, not xproto.xml, making them
>> hard-coded parts of libxcb.  So I think they need to remain hard-coded
>> in xpyb as well unless there is something I'm missing.  The xproto.xml
>> file contains an alternate definition of XCB_CURRENT_TIME (in the "Time"
>> enum), but none of the other constants above are defined there currently.
>>
>> The atom constants definitely should go and I will push that part of the
>> patch.
>>     
>
> You're right, I totally missed that lines.
> Is XCB_COPY_FROM_PARENT worh it too? It seems at least defined once (in
> class WindowlClass, but I'm not sure it's not used in some other function.
>
>   

CopyFromParent can be used for other fields of the CreateWindow request
besides the class.  It works as a visual and (effectively) a depth.

--Eamon W.



More information about the Xcb mailing list