Skip to content

Commit 6aaf3bb

Browse files
autoconvert None to ffi.NULL
1 parent 5badf34 commit 6aaf3bb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyray/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ def func(*args):
5757
arg = ffi.addressof(arg)
5858
elif str(type(arg)) == "<class '_cffi_backend._CDataBase'>" and "*" not in str(arg): #Pypy
5959
arg = ffi.addressof(arg)
60+
elif arg is None:
61+
arg = ffi.NULL
6062
modified_args.append(arg)
6163
result = a(*modified_args)
6264
if result is None:

0 commit comments

Comments
 (0)