automate conversion of lists of strings https://github.com/electronstudio/raylib-python-cffi/discussions/98
This commit is contained in:
parent
2c233d47fa
commit
81590eb815
1 changed files with 3 additions and 1 deletions
|
@ -53,6 +53,8 @@ def makefunc(a):
|
|||
arg = ffi.new("int *", arg)
|
||||
elif type(arg) is float:
|
||||
arg = ffi.new("float *", arg)
|
||||
elif type(arg) is list and str(c_arg) == "<ctype 'char * *'>":
|
||||
arg = [ffi.new("char[]", x.encode('utf-8')) for x in arg]
|
||||
elif str(type(arg)) == "<class '_cffi_backend.__CDataOwn'>" and "*" not in str(arg): # CPython
|
||||
arg = ffi.addressof(arg)
|
||||
elif str(type(arg)) == "<class '_cffi_backend._CDataBase'>" and "*" not in str(arg): # Pypy
|
||||
|
|
Reference in a new issue