Ticket #26418: libxcb-python3.patch

File libxcb-python3.patch, 701 bytes (added by jmroot (Joshua Root), 13 years ago)
  • src/c_client.py

    def _c_type_setup(self, name, postfix): 
    288288            field.c_field_type = _t(field.field_type)
    289289            field.c_field_const_type = ('' if field.type.nmemb == 1 else 'const ') + field.c_field_type
    290290            field.c_field_name = _cpp(field.field_name)
    291             field.c_subscript = '[%d]' % field.type.nmemb if (field.type.nmemb > 1) else ''
     291            field.c_subscript = '[%d]' % field.type.nmemb if (field.type.nmemb and field.type.nmemb > 1) else ''
    292292            field.c_pointer = ' ' if field.type.nmemb == 1 else '*'
    293293
    294294            field.c_iterator_type = _t(field.field_type + ('iterator',))      # xcb_fieldtype_iterator_t