Skip to content

Commit 10d9830

Browse files
fix for pypy
1 parent e624ad2 commit 10d9830

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pyray/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ def func(*args):
7575
arg = ffi.new("int *", arg)
7676
elif type(arg) is float:
7777
arg = ffi.new("float *", arg)
78-
elif str(type(arg)) == "<class '_cffi_backend.__CDataOwn'>" and "*" not in str(arg):
78+
elif str(type(arg)) == "<class '_cffi_backend.__CDataOwn'>" and "*" not in str(arg): #CPython
79+
arg = ffi.addressof(arg)
80+
elif str(type(arg)) == "<class '_cffi_backend._CDataBase'>" and "*" not in str(arg): #Pypy
7981
arg = ffi.addressof(arg)
8082
modified_args.append(arg)
8183
result = a(*modified_args)

0 commit comments

Comments
 (0)