Skip to content

Commit

Permalink
Fix impropper hid_bus_type declaration
Browse files Browse the repository at this point in the history
- To match the original declaration in HIDAPI upstream
and avoid compilation errors with newer gcc;
- Include all "system" headers with '<>';
to be explicit that those don't belong to this project/module;
  • Loading branch information
Youw authored and prusnak committed Nov 12, 2023
1 parent 6b7e109 commit c9eec80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions chid.pxd
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from libc.stddef cimport wchar_t, size_t

cdef extern from "hidapi.h":
cdef extern from "<hidapi.h>":
ctypedef struct hid_device:
pass

cdef enum hid_bus_type:
ctypedef enum hid_bus_type:
HID_API_BUS_UNKNOWN = 0x00,
HID_API_BUS_USB = 0x01,
HID_API_BUS_BLUETOOTH = 0x02,
Expand Down
4 changes: 2 additions & 2 deletions hid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ __version__ = "0.14.0"
hid_init()


cdef extern from "ctype.h":
cdef extern from "<ctype.h>":
int wcslen(wchar_t*)

cdef extern from "stdlib.h":
cdef extern from "<stdlib.h>":
void free(void* ptr)
void* malloc(size_t size)

Expand Down

0 comments on commit c9eec80

Please sign in to comment.