Skip to content

Commit 4aa0d33

Browse files
committed
py: fix channel creation ctypes
Signed-off-by: alwin-joshy <joshyalwin@gmail.com>
1 parent c7194a2 commit 4aa0d33

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/python/module.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ def ffi_bool_ptr(val: Optional[bool]):
298298
Convert a bool value to a bool pointer for FFI.
299299
If 'val' is None then we return None (which acts as a null pointer)
300300
"""
301-
if n is None:
301+
if val is None:
302302
return None
303303

304304
return pointer(c_bool(val))
@@ -572,6 +572,7 @@ def __init__(
572572
notify_a: Optional[bool] = None,
573573
notify_b: Optional[bool] = None,
574574
) -> None:
575+
c_pp = None
575576
if pp_a is not None:
576577
c_pp = 0
577578
elif pp_b is not None:
@@ -587,7 +588,7 @@ def __init__(
587588
ffi_uint8_ptr(b_id),
588589
ffi_bool_ptr(notify_a),
589590
ffi_bool_ptr(notify_b),
590-
ffi_uint8_ptr(pp_val),
591+
ffi_uint8_ptr(c_pp),
591592
)
592593

593594
@property

0 commit comments

Comments
 (0)