mirror of
https://github.com/nqrduck/LimeDriverBindings.git
synced 2024-06-15 18:45:17 +00:00
Encode device parameter before channel retrieval
Fixed an issue in the `get_channels_for_device` function where the input device name wasn't being encoded before passing it to the underlying C function `getChannelsFromInfo`. This change ensures compatibility with the expected string encoding, preventing potential runtime errors related to string handling across the Python-C boundary.
This commit is contained in:
parent
8874795fd0
commit
fc536126bc
|
@ -724,5 +724,5 @@ def get_device_list():
|
|||
return [device.decode('utf-8') for device in devices]
|
||||
|
||||
def get_channels_for_device(device = ""):
|
||||
cdef pair[int, int] channels = getChannelsFromInfo(device)
|
||||
cdef pair[int, int] channels = getChannelsFromInfo(device.encode())
|
||||
return channels.first, channels.second
|
||||
|
|
Loading…
Reference in a new issue