autoconvert None to ffi.NULL

This commit is contained in:
richard 2022-07-23 02:22:49 +01:00
parent 5badf348c7
commit 6aaf3bb391

View file

@ -57,6 +57,8 @@ def makefunc(a):
arg = ffi.addressof(arg)
elif str(type(arg)) == "<class '_cffi_backend._CDataBase'>" and "*" not in str(arg): #Pypy
arg = ffi.addressof(arg)
elif arg is None:
arg = ffi.NULL
modified_args.append(arg)
result = a(*modified_args)
if result is None: