Skip to content

Commit

Permalink
Remove hidapi_exit() entirely
Browse files Browse the repository at this point in the history
It was not supposed to be used explicitly in the first place (see
comments on the PR this commit is a part of).  The HIDAPI library will
still be cleanly finalized before the program terminates, through
another – automatic – mechanism.

Additionally, the only currently known caller is using it as a
workaround for another issue (#114), and that use case would not be
supported by the no-op compatibility shim anyway.

Related: #114 ("Cannot reenumarate devices in same python process")
Related: #128 ("Fatal Python error: Segmentation fault on 0.11.0.post2")
  • Loading branch information
jonasmalacofilho authored and prusnak committed Nov 2, 2021
1 parent b30aa8e commit 467a2df
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions hid.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ def enumerate(int vendor_id=0, int product_id=0):
hid_free_enumeration(info)
return res

def hidapi_exit():
"""No-op.
Turned into a no-op to prevent memory safety bugs (see issue #128).
HIDAPI will be finalized automatically, when appropriate.
"""

cdef class device:
"""Device class.
Expand Down

0 comments on commit 467a2df

Please sign in to comment.