[Xcb] quick ABI/API-compat audit

Christian Linhart chris at DemoRecorder.com
Mon Feb 1 00:03:16 PST 2016


Hi,

I have made a quick ABI/API audit by diffing the headerfiles, to see where we are with respect to a new release.

Here are the major issues (blockers) that I have found:
=======================================================

All of the major issues are in the XPRINT-extension.
Is XPRINT still in use somewhere?
If its not in use anywhere we may get away with releasing a changes ABI/API for the XCB impl of XPRINT.

Anyways, here are the changes which I have found:

* parameter list changes (probably due to bugfixforproper support for lengthless lists
    which made length-parameters disappear from sizeof and data functions.)

--------------------------
@@ -1232,9 +1250,7 @@ xcb_x_print_print_end_doc (xcb_connectio
                            uint8_t           cancel);
 
 int
-xcb_x_print_print_put_document_data_sizeof (const void  *_buffer,
-                                            uint32_t     doc_format_len,
-                                            uint32_t     options_len);
+xcb_x_print_print_put_document_data_sizeof (const void  *_buffer);
 
 /**
  *
@@ -1254,9 +1270,7 @@ xcb_x_print_print_put_document_data_chec
                                              uint16_t                     len_fmt,
                                              uint16_t                     len_options,
                                              const uint8_t               *data,
-                                             uint32_t                     doc_format_len,
                                              const xcb_x_print_string8_t *doc_format,
-                                             uint32_t                     options_len,
                                              const xcb_x_print_string8_t *options);
 
 /**
@@ -1274,11 +1288,36 @@ xcb_x_print_print_put_document_data (xcb
                                      uint16_t                     len_fmt,
                                      uint16_t                     len_options,
                                      const uint8_t               *data,
-                                     uint32_t                     doc_format_len,
                                      const xcb_x_print_string8_t *doc_format,
-                                     uint32_t                     options_len,
                                      const xcb_x_print_string8_t *options);
--------------------------

* other parameter list changes:

--------------------------
  xcb_void_cookie_t
 xcb_x_print_print_select_input_checked (xcb_connection_t       *c,
                                         xcb_x_print_pcontext_t  context,
-                                        uint32_t                event_mask,
-                                        const uint32_t         *event_list);
+                                        uint32_t                event_mask);
--------------------------
  xcb_void_cookie_t
 xcb_x_print_print_select_input (xcb_connection_t       *c,
                                 xcb_x_print_pcontext_t  context,
-                                uint32_t                event_mask,
-                                const uint32_t         *event_list);
+                                uint32_t                event_mask);
--------------------------

* functions disappeared:

--------------------------
-int
-xcb_x_print_print_select_input_sizeof (const void  *_buffer);
-
--------------------------
-int
-xcb_x_print_print_input_selected_serialize (void                                           **_buffer,
-                                            const xcb_x_print_print_input_selected_reply_t  *_aux,
-                                            const uint32_t                                  *event_list,
-                                            const uint32_t                                  *all_events_list);
-
-int
-xcb_x_print_print_input_selected_unserialize (const void                                 *_buffer,
-                                              xcb_x_print_print_input_selected_reply_t  **_aux);
-
-int
-xcb_x_print_print_input_selected_sizeof (const void  *_buffer);
--------------------------
-uint32_t *
-xcb_x_print_print_input_selected_event_list (const xcb_x_print_print_input_selected_reply_t *R);
-
-int
-xcb_x_print_print_input_selected_event_list_length (const xcb_x_print_print_input_selected_reply_t *R);
-
-xcb_generic_iterator_t
-xcb_x_print_print_input_selected_event_list_end (const xcb_x_print_print_input_selected_reply_t *R);
-
-uint32_t *
-xcb_x_print_print_input_selected_all_events_list (const xcb_x_print_print_input_selected_reply_t *R);
-
-int
-xcb_x_print_print_input_selected_all_events_list_length (const xcb_x_print_print_input_selected_reply_t *R);
-
-xcb_generic_iterator_t
-xcb_x_print_print_input_selected_all_events_list_end (const xcb_x_print_print_input_selected_reply_t *R);
-
--------------------------

Here are some minor issues:
===========================

These minor issues change the API at places which are probably not used. The ABI stays compatible.

* nested structs have lost their names. As far as I remember this was intentional and agreed upon, but it is still a minor API break.
  These are things like this:

--------------------------
@@ -2526,7 +2526,7 @@ typedef struct xcb_xkb_get_kbd_by_name_r
  * @brief xcb_xkb_get_kbd_by_name_replies_t
  **/
 typedef struct xcb_xkb_get_kbd_by_name_replies_t {
-    struct _types {
+    struct {
         uint8_t      
--------------------------


* The numbering of pads changes.
  pads are not meant to be accessed, so this should be OK:

--------------------------
-        uint8_t                                                 pad6[4];
+        uint8_t                                                 pad10[4];
--------------------------


* accessor functions for accessing pads disappeared:
  This should be ok because pads are not meant to be accessed:

--------------------------
-uint8_t *
-xcb_xkb_get_names_value_list_alignment_pad (const xcb_xkb_get_names_value_list_t *S);
-
-int
-xcb_xkb_get_names_value_list_alignment_pad_length (const xcb_xkb_get_names_reply_t *R,
-                                                   const xcb_xkb_get_names_value_list_t *S);
-
-xcb_generic_iterator_t
-xcb_xkb_get_names_value_list_alignment_pad_end (const xcb_xkb_get_names_reply_t *R,
-                                                const xcb_xkb_get_names_value_list_t *S);
-
 xcb_atom_t *
 xcb_xkb_get_names_value_list_kt_level_names (const xcb_xkb_get_names_value_list_t *S);
--------------------------


====================

If you have any comments to the ABI/API issues please post a reply.

Especially, it is interesting whether we can get away with breaking the ABI and API for XPRINT.

Cheers,

Chris



More information about the Xcb mailing list