[arch-commits] Commit in python-hidapi/trunk (revert-hid_get_input_report.patch)

Morten Linderud foxboron at gemini.archlinux.org
Fri Nov 5 20:43:56 UTC 2021


    Date: Friday, November 5, 2021 @ 20:43:56
  Author: foxboron
Revision: 1037286

upgpkg: python-hidapi 0.11.0.2-1

Deleted:
  python-hidapi/trunk/revert-hid_get_input_report.patch

-----------------------------------+
 revert-hid_get_input_report.patch |   79 ------------------------------------
 1 file changed, 79 deletions(-)

Deleted: revert-hid_get_input_report.patch
===================================================================
--- revert-hid_get_input_report.patch	2021-11-05 20:42:27 UTC (rev 1037285)
+++ revert-hid_get_input_report.patch	2021-11-05 20:43:56 UTC (rev 1037286)
@@ -1,79 +0,0 @@
-diff --unified --recursive --text package.orig/chid.pxd package.new/chid.pxd
---- package.orig/chid.pxd	2020-07-05 23:48:53.567649269 -0300
-+++ package.new/chid.pxd	2020-07-05 23:49:40.391130648 -0300
-@@ -29,7 +29,6 @@
-   int hid_set_nonblocking(hid_device* device, int value)
-   int hid_send_feature_report(hid_device* device, unsigned char *data, int length) nogil
-   int hid_get_feature_report(hid_device* device, unsigned char *data, int length) nogil
--  int hid_get_input_report(hid_device* device, unsigned char *data, int length) nogil
- 
-   int hid_get_manufacturer_string(hid_device*, wchar_t *, size_t)
-   int hid_get_product_string(hid_device*, wchar_t *, size_t)
-diff --unified --recursive --text package.orig/hid.pyx package.new/hid.pyx
---- package.orig/hid.pyx	2020-07-05 23:48:53.567649269 -0300
-+++ package.new/hid.pyx	2020-07-05 23:49:40.391130648 -0300
-@@ -206,30 +206,6 @@
-           free(cbuff)
-       return res
- 
--  def get_input_report(self, int report_num, int max_length):
--      if self._c_hid == NULL:
--          raise ValueError('not open')
--      cdef hid_device * c_hid = self._c_hid
--      cdef unsigned char lbuff[16]
--      cdef unsigned char* cbuff
--      cdef size_t c_max_length = max_length
--      cdef int n
--      if max_length <= 16:
--          cbuff = lbuff
--      else:
--          cbuff = <unsigned char *>malloc(max_length)
--      cbuff[0] = report_num
--      with nogil:
--          n = hid_get_input_report(c_hid, cbuff, c_max_length)
--      res = []
--      if n < 0:
--          raise IOError('read error')
--      for i in range(n):
--          res.append(cbuff[i])
--      if max_length > 16:
--          free(cbuff)
--      return res
--
-   def error(self):
-       if self._c_hid == NULL:
-           raise ValueError('not open')
-diff --unified --recursive --text package.orig/hidraw.pyx package.new/hidraw.pyx
---- package.orig/hidraw.pyx	2020-07-05 23:48:53.570982615 -0300
-+++ package.new/hidraw.pyx	2020-07-05 23:49:40.391130648 -0300
-@@ -206,30 +206,6 @@
-           free(cbuff)
-       return res
- 
--  def get_input_report(self, int report_num, int max_length):
--      if self._c_hid == NULL:
--          raise ValueError('not open')
--      cdef hid_device * c_hid = self._c_hid
--      cdef unsigned char lbuff[16]
--      cdef unsigned char* cbuff
--      cdef size_t c_max_length = max_length
--      cdef int n
--      if max_length <= 16:
--          cbuff = lbuff
--      else:
--          cbuff = <unsigned char *>malloc(max_length)
--      cbuff[0] = report_num
--      with nogil:
--          n = hid_get_input_report(c_hid, cbuff, c_max_length)
--      res = []
--      if n < 0:
--          raise IOError('read error')
--      for i in range(n):
--          res.append(cbuff[i])
--      if max_length > 16:
--          free(cbuff)
--      return res
--
-   def error(self):
-       if self._c_hid == NULL:
-           raise ValueError('not open')



More information about the arch-commits mailing list