From 10d983008f109515cb1c161cf13449abc1d70176 Mon Sep 17 00:00:00 2001 From: richard Date: Fri, 20 May 2022 07:05:38 +0100 Subject: [PATCH] fix for pypy --- pyray/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyray/__init__.py b/pyray/__init__.py index 728e310..e0a2104 100644 --- a/pyray/__init__.py +++ b/pyray/__init__.py @@ -75,7 +75,9 @@ def makefunc(a): arg = ffi.new("int *", arg) elif type(arg) is float: arg = ffi.new("float *", arg) - elif str(type(arg)) == "" and "*" not in str(arg): + elif str(type(arg)) == "" and "*" not in str(arg): #CPython + arg = ffi.addressof(arg) + elif str(type(arg)) == "" and "*" not in str(arg): #Pypy arg = ffi.addressof(arg) modified_args.append(arg) result = a(*modified_args)