python-35x-fixes.patch 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. diff --git a/src/c_client.py b/src/c_client.py
  2. index 57de3fb..043338d 100644
  3. --- a/src/c_client.py
  4. +++ b/src/c_client.py
  5. @@ -1364,7 +1364,7 @@ def _c_serialize(context, self):
  6. _c(' unsigned int xcb_align_to = 0;')
  7. if self.is_switch:
  8. _c(' unsigned int xcb_padding_offset = %d;',
  9. - self.get_align_offset() )
  10. + self.get_align_offset() )
  11. prefix = [('_aux', '->', self)]
  12. aux_ptr = 'xcb_out'
  13. @@ -1390,7 +1390,7 @@ def _c_serialize(context, self):
  14. _c(' unsigned int xcb_align_to = 0;')
  15. if self.is_switch:
  16. _c(' unsigned int xcb_padding_offset = %d;',
  17. - self.get_align_offset() )
  18. + self.get_align_offset() )
  19. elif 'sizeof' == context:
  20. param_names = [p[2] for p in params]
  21. @@ -1930,14 +1930,14 @@ def _c_accessors_list(self, field):
  22. # from the request size and divide that by the member size
  23. return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))'
  24. else:
  25. - # use the accessor to get the start of the list, then
  26. - # compute the length of it by subtracting it from
  27. + # use the accessor to get the start of the list, then
  28. + # compute the length of it by subtracting it from
  29. # the adress of the first byte after the end of the
  30. # request
  31. - after_end_of_request = '(((char*)R) + R->length * 4)'
  32. - start_of_list = '%s(R)' % (field.c_accessor_name)
  33. + after_end_of_request = '(((char*)R) + R->length * 4)'
  34. + start_of_list = '%s(R)' % (field.c_accessor_name)
  35. bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list)
  36. - return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
  37. + return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
  38. else:
  39. raise Exception(
  40. "lengthless lists with varsized members are not supported. Fieldname '%s'"