[Xcb] [PATCH libxcb 6/7] c_client.py: remove useless generated comments

Ran Benita ran234 at gmail.com
Sun Feb 23 12:55:20 PST 2014


They are bloated, don't add anything over the signature, in some cases
duplicate the doxygen comments, and are not integrated with the <doc>
tags in any way. Remove them and cut the generated LOC by half.

Signed-off-by: Ran Benita <ran234 at gmail.com>
---
 src/c_client.py | 124 --------------------------------------------------------
 1 file changed, 124 deletions(-)

diff --git a/src/c_client.py b/src/c_client.py
index 8e42203..64de312 100644
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -1320,16 +1320,6 @@ def _c_iterator(self, name):
     _h(' * element. The member index is increased by sizeof(%s)', self.c_type)
     _h(' */')
     _c('')
-    _hc('')
-    _hc('/*****************************************************************************')
-    _hc(' **')
-    _hc(' ** void %s', self.c_next_name)
-    _hc(' ** ')
-    _hc(' ** @param %s *i', self.c_iterator_type)
-    _hc(' ** @returns void')
-    _hc(' **')
-    _hc(' *****************************************************************************/')
-    _hc(' ')
     _hc('void')
     _h('%s (%s *i  /**< */);', self.c_next_name, self.c_iterator_type)
     _c('%s (%s *i  /**< */)', self.c_next_name, self.c_iterator_type)
@@ -1371,16 +1361,6 @@ def _c_iterator(self, name):
     _h(' * last element.')
     _h(' */')
     _c('')
-    _hc('')
-    _hc('/*****************************************************************************')
-    _hc(' **')
-    _hc(' ** xcb_generic_iterator_t %s', self.c_end_name)
-    _hc(' ** ')
-    _hc(' ** @param %s i', self.c_iterator_type)
-    _hc(' ** @returns xcb_generic_iterator_t')
-    _hc(' **')
-    _hc(' *****************************************************************************/')
-    _hc(' ')
     _hc('xcb_generic_iterator_t')
     _h('%s (%s i  /**< */);', self.c_end_name, self.c_iterator_type)
     _c('%s (%s i  /**< */)', self.c_end_name, self.c_iterator_type)
@@ -1488,16 +1468,6 @@ def _c_accessors_field(self, field):
 
     if field.type.is_simple:
         _hc('')
-        _hc('')
-        _hc('/*****************************************************************************')
-        _hc(' ** ')
-        _hc(' ** %s %s', field.c_field_type, field.c_accessor_name)
-        _hc(' ** ')
-        _hc(' ** @param const %s *R', c_type)
-        _hc(' ** @returns %s', field.c_field_type)
-        _hc(' **')
-        _hc(' *****************************************************************************/')
-        _hc(' ')
         _hc('%s', field.c_field_type)
         _h('%s (const %s *R  /**< */);', field.c_accessor_name, c_type)
         _c('%s (const %s *R  /**< */)', field.c_accessor_name, c_type)
@@ -1511,16 +1481,6 @@ def _c_accessors_field(self, field):
         _c('}')
     else:
         _hc('')
-        _hc('')
-        _hc('/*****************************************************************************')
-        _hc(' **')
-        _hc(' ** %s * %s', field.c_field_type, field.c_accessor_name)
-        _hc(' ** ')
-        _hc(' ** @param const %s *R', c_type)
-        _hc(' ** @returns %s *', field.c_field_type)
-        _hc(' **')
-        _hc(' *****************************************************************************/')
-        _hc(' ')
         if field.type.is_switch and switch_obj is None:
             return_type = 'void *'
         else:
@@ -1602,16 +1562,6 @@ def _c_accessors_list(self, field):
     if list.member.fixed_size():
         idx = 1 if switch_obj is not None else 0
         _hc('')
-        _hc('')
-        _hc('/*****************************************************************************')
-        _hc(' **')
-        _hc(' ** %s * %s', field.c_field_type, field.c_accessor_name)
-        _hc(' ** ')
-        _hc(' ** @param %s', params[idx][0])
-        _hc(' ** @returns %s *', field.c_field_type)
-        _hc(' **')
-        _hc(' *****************************************************************************/')
-        _hc(' ')
         _hc('%s *', field.c_field_type)
 
         _h('%s (%s  /**< */);', field.c_accessor_name, params[idx][0])
@@ -1629,16 +1579,6 @@ def _c_accessors_list(self, field):
         _c('}')
 
     _hc('')
-    _hc('')
-    _hc('/*****************************************************************************')
-    _hc(' **')
-    _hc(' ** int %s', field.c_length_name)
-    _hc(' ** ')
-    _hc(' ** @param const %s *R', c_type)
-    _hc(' ** @returns int')
-    _hc(' **')
-    _hc(' *****************************************************************************/')
-    _hc(' ')
     _hc('int')
     if switch_obj is not None:
         _hc('%s (const %s *R  /**< */,', field.c_length_name, R_obj.c_type)
@@ -1656,16 +1596,6 @@ def _c_accessors_list(self, field):
 
     if field.type.member.is_simple:
         _hc('')
-        _hc('')
-        _hc('/*****************************************************************************')
-        _hc(' **')
-        _hc(' ** xcb_generic_iterator_t %s', field.c_end_name)
-        _hc(' ** ')
-        _hc(' ** @param const %s *R', c_type)
-        _hc(' ** @returns xcb_generic_iterator_t')
-        _hc(' **')
-        _hc(' *****************************************************************************/')
-        _hc(' ')
         _hc('xcb_generic_iterator_t')
         if switch_obj is not None:
             _hc('%s (const %s *R  /**< */,', field.c_end_name, R_obj.c_type)
@@ -1698,17 +1628,6 @@ def _c_accessors_list(self, field):
 
     else:
         _hc('')
-        _hc('')
-        _hc('/*****************************************************************************')
-        _hc(' **')
-        _hc(' ** %s %s', field.c_iterator_type, field.c_iterator_name)
-        _hc(' ** ')
-        _hc(' ** @param const %s *R', c_type)
-        _hc(' ** @returns %s', field.c_iterator_type)
-        _hc(' **')
-        _hc(' *****************************************************************************/')
-        _hc(' ')
-
         _hc('%s', field.c_iterator_type)
         if switch_obj is not None:
             _hc('%s (const %s *R  /**< */,', field.c_iterator_name, R_obj.c_type)
@@ -1982,26 +1901,6 @@ def _c_request_helper(self, name, cookie_type, void, regular, aux=False, reply_f
         _h(' * placed in the event queue.')
     _h(' */')
     _c('')
-    _hc('')
-    _hc('/*****************************************************************************')
-    _hc(' **')
-    _hc(' ** %s %s', cookie_type, func_name)
-    _hc(' ** ')
-
-    spacing = ' ' * (maxtypelen - len('xcb_connection_t'))
-    _hc(' ** @param xcb_connection_t%s *c', spacing)
-
-    for field in param_fields:
-        c_field_const_type = field.c_field_const_type
-        if field.type.c_need_serialize and not aux:
-            c_field_const_type = "const void"
-        spacing = ' ' * (maxtypelen - len(c_field_const_type))
-        _hc(' ** @param %s%s %s%s', c_field_const_type, spacing, field.c_pointer, field.c_field_name)
-
-    _hc(' ** @returns %s', cookie_type)
-    _hc(' **')
-    _hc(' *****************************************************************************/')
-    _hc(' ')
     _hc('%s', cookie_type)
 
     spacing = ' ' * (maxtypelen - len('xcb_connection_t'))
@@ -2222,18 +2121,6 @@ def _c_reply(self, name):
     _h(' * The returned value must be freed by the caller using free().')
     _h(' */')
     _c('')
-    _hc('')
-    _hc('/*****************************************************************************')
-    _hc(' **')
-    _hc(' ** %s * %s', self.c_reply_type, self.c_reply_name)
-    _hc(' ** ')
-    _hc(' ** @param xcb_connection_t%s  *c', spacing1)
-    _hc(' ** @param %s   cookie', self.c_cookie_type)
-    _hc(' ** @param xcb_generic_error_t%s **e', spacing2)
-    _hc(' ** @returns %s *', self.c_reply_type)
-    _hc(' **')
-    _hc(' *****************************************************************************/')
-    _hc(' ')
     _hc('%s *', self.c_reply_type)
     _hc('%s (xcb_connection_t%s  *c  /**< */,', self.c_reply_name, spacing1)
     _hc('%s%s   cookie  /**< */,', spacing3, self.c_cookie_type)
@@ -2294,17 +2181,6 @@ def _c_reply_fds(self, name):
     _h(' * The returned value must be freed by the caller using free().')
     _h(' */')
     _c('')
-    _hc('')
-    _hc('/*****************************************************************************')
-    _hc(' **')
-    _hc(' ** int * %s', self.c_reply_fds_name)
-    _hc(' ** ')
-    _hc(' ** @param xcb_connection_t%s  *c', spacing1)
-    _hc(' ** @param %s  *reply', self.c_reply_type)
-    _hc(' ** @returns int *')
-    _hc(' **')
-    _hc(' *****************************************************************************/')
-    _hc(' ')
     _hc('int *')
     _hc('%s (xcb_connection_t%s  *c  /**< */,', self.c_reply_fds_name, spacing1)
     _h('%s%s  *reply  /**< */);', spacing3, self.c_reply_type)
-- 
1.9.0



More information about the Xcb mailing list