[Xcb] python generator again

Thomas Hunger hto at arcor.de
Tue Jun 12 06:44:48 PDT 2007


> What I am missing is a way to compare if both APIs (XSL-generated
> and Python-generated) are exactly the same (i.e. do all functions
> have the same signature). Does anyone know how to do this?

Attached is a hackish script which checks if two APIs are the same. It 
needs the ctags programm [1] which is available in Debian. It takes 
two c files as arguments and outputs the difference between the 
APIs. Example output:

$ python tagsgen.py xproto-new.c xproto-old.c 

In xproto-new.c but NOT in xproto-old.c


xcb_query_keymap_keys_end constxcb_query_keymap_reply_t*R
xcb_query_keymap_keys constxcb_query_keymap_reply_t*R
xcb_get_keyboard_control_auto_repeats_end 
constxcb_get_keyboard_control_reply_t*R
xcb_get_keyboard_control_auto_repeats 
constxcb_get_keyboard_control_reply_t*R


In xproto-old.c but NOT in xproto-new.c

> Unfortunally I already know of two major changes which I need to
> implement at least parts of the server side XCB.

Now that I can check the API I shuffle around quite a lot of code. If 
anyone wants to look at it w/o download see http://htom.de/gitweb/

[1] http://ctags.sourceforge.net/
    or aptitude install exuberant-ctags
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tagsgen.py
Type: application/x-python
Size: 832 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20070612/afc0f196/attachment.bin 


More information about the Xcb mailing list